-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from lokalise/feature/HOME-1781-new-permissio…
…n-endpoints HOME-1781: Added role id to contributor and group endpoints
- Loading branch information
Showing
5 changed files
with
58 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var permissionTemplateCmd = &cobra.Command{ | ||
Use: "permission-template", | ||
Short: "Manage permission templates for a team", | ||
Long: "Manage all templates for permissions inside a team.", | ||
} | ||
|
||
var permissionTemplateListCmd = &cobra.Command{ | ||
Use: "list", | ||
Short: "List permission templates", | ||
Long: "Retrieves a list of permission templates.", | ||
RunE: func(*cobra.Command, []string) error { | ||
c := Api.PermissionTemplates() | ||
data, err := c.ListPermissionRoles(teamId) | ||
if err != nil { | ||
return err | ||
} | ||
return printJson(data) | ||
}, | ||
} | ||
|
||
func init() { | ||
permissionTemplateCmd.AddCommand(permissionTemplateListCmd) | ||
rootCmd.AddCommand(permissionTemplateCmd) | ||
|
||
flagTeamId(permissionTemplateCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters