cmd/policies: description is a string field, not slice
Closes
@@ -11,8 +11,8 @@ var policiesCreateCmd = &cobra.Command{
Long: `To create a policy, either specify the files flag or pass arguments to create it directly from the CLI.
Example
- hydra policies create -f [policy-a.json,policy-b.json]
- hydra policies create -s [peter,max] -r [blog,users] -a [post,ban] --allow`,
+ hydra policies create -f policy-a.json,policy-b.json
+ hydra policies create -s peter,max -r blog,users -a post,ban --allow`,
Run: cmdHandler.Policies.CreatePolicy,
}
@@ -21,7 +21,7 @@ func init() {
policiesCreateCmd.Flags().StringSliceP("files", "f", []string{}, "A list of paths to JSON encoded policy files")
policiesCreateCmd.Flags().StringP("id", "i", "", "The policy's id")
- policiesCreateCmd.Flags().StringSliceP("description", "d", []string{}, "The policy's description")
+ policiesCreateCmd.Flags().StringP("description", "d", "", "The policy's description")
policiesCreateCmd.Flags().StringSliceP("resources", "r", []string{}, "A list of resource regex strings this policy will match to (required)")
policiesCreateCmd.Flags().StringSliceP("subjects", "s", []string{}, "A list of subject regex strings this policy will match to (required)")
policiesCreateCmd.Flags().StringSliceP("actions", "a", []string{}, "A list of action regex strings this policy will match to (required)")
