fix role and groups command

This commit is contained in:
abhishek9686
2024-08-24 18:12:19 +05:30
parent a5c66f1b87
commit ddb8f6fa06
6 changed files with 64 additions and 24 deletions

View File

@@ -46,7 +46,7 @@ func init() {
"Platform Role of the user; run `nmctl roles list` to see available user roles")
userCreateCmd.MarkFlagRequired("name")
userCreateCmd.MarkFlagRequired("password")
userCreateCmd.PersistentFlags().StringToStringVarP(&networkRoles, "network-roles", "n", make(map[string]string),
userCreateCmd.PersistentFlags().StringToStringVarP(&networkRoles, "network-roles", "n", nil,
"Mapping of networkID and list of roles user will be part of (comma separated)")
userCreateCmd.Flags().BoolVar(&admin, "admin", false, "Make the user an admin ? (deprecated v0.25.0 onwards)")
userCreateCmd.Flags().StringArrayVarP(&groups, "groups", "g", nil, "List of user groups the user will be part of (comma separated)")