(ch *cmdutil.Helper)
| 7 | ) |
| 8 | |
| 9 | func UserCmd(ch *cmdutil.Helper) *cobra.Command { |
| 10 | userCmd := &cobra.Command{ |
| 11 | Use: "user", |
| 12 | Short: "Manage users", |
| 13 | PersistentPreRunE: cmdutil.CheckChain(cmdutil.CheckAuth(ch), cmdutil.CheckOrganization(ch)), |
| 14 | } |
| 15 | |
| 16 | userCmd.AddCommand(ListCmd(ch)) |
| 17 | userCmd.AddCommand(ShowCmd(ch)) |
| 18 | userCmd.AddCommand(AddCmd(ch)) |
| 19 | userCmd.AddCommand(RemoveCmd(ch)) |
| 20 | userCmd.AddCommand(SetRoleCmd(ch)) |
| 21 | userCmd.AddCommand(SetAttributesCmd(ch)) |
| 22 | userCmd.AddCommand(SetResourceCmd(ch)) |
| 23 | userCmd.AddCommand(whitelist.WhitelistCmd(ch)) |
| 24 | |
| 25 | return userCmd |
| 26 | } |
| 27 | |
| 28 | var orgRoles = []string{"admin", "editor", "viewer", "guest"} |
| 29 |
no test coverage detected