MCPcopy Index your code
hub / github.com/rilldata/rill / UserCmd

Function UserCmd

cli/cmd/user/user.go:9–26  ·  view source on GitHub ↗
(ch *cmdutil.Helper)

Source from the content-addressed store, hash-verified

7)
8
9func 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
28var orgRoles = []string{"admin", "editor", "viewer", "guest"}
29

Callers 1

RootCmdFunction · 0.92

Calls 11

CheckChainFunction · 0.92
CheckAuthFunction · 0.92
CheckOrganizationFunction · 0.92
WhitelistCmdFunction · 0.92
SetAttributesCmdFunction · 0.85
SetResourceCmdFunction · 0.85
ListCmdFunction · 0.70
ShowCmdFunction · 0.70
AddCmdFunction · 0.70
RemoveCmdFunction · 0.70
SetRoleCmdFunction · 0.70

Tested by

no test coverage detected