diff --git a/cmd/client/handler_warden.go b/cmd/client/handler_warden.go index 388ba1eda..08fc4f866 100644 --- a/cmd/client/handler_warden.go +++ b/cmd/client/handler_warden.go @@ -51,8 +51,8 @@ func newWardenHandler() *WardenHandler { func (h *WardenHandler) IsOAuth2AccessTokenAuthorized(cmd *cobra.Command, args []string) { token, _ := cmd.Flags().GetString("token") scope, _ := cmd.Flags().GetStringArray("scope") - action, _ := cmd.Flags().GetString("actions") - resource, _ := cmd.Flags().GetString("resources") + action, _ := cmd.Flags().GetString("action") + resource, _ := cmd.Flags().GetString("resource") m := h.newWardenManager(cmd) _, response, err := m.IsOAuth2AccessTokenAuthorized(keto.WardenOAuth2AccessTokenAuthorizationRequest{ @@ -66,8 +66,8 @@ func (h *WardenHandler) IsOAuth2AccessTokenAuthorized(cmd *cobra.Command, args [ } func (h *WardenHandler) IsSubjectAuthorized(cmd *cobra.Command, args []string) { subject, _ := cmd.Flags().GetString("subject") - action, _ := cmd.Flags().GetString("actions") - resource, _ := cmd.Flags().GetString("resources") + action, _ := cmd.Flags().GetString("action") + resource, _ := cmd.Flags().GetString("resource") m := h.newWardenManager(cmd) _, response, err := m.IsSubjectAuthorized(keto.WardenSubjectAuthorizationRequest{ diff --git a/cmd/warden_subject.go b/cmd/warden_subject.go index 8eabb7ce0..7aef72fba 100644 --- a/cmd/warden_subject.go +++ b/cmd/warden_subject.go @@ -37,7 +37,7 @@ func init() { // Cobra supports local flags which will only run when this command // is called directly, e.g.: - subjectCmd.Flags().String("subject", "", "The request's subject") - subjectCmd.Flags().String("action", "", "The request's action") - subjectCmd.Flags().String("resource", "", "The request's resource") + subjectCmd.Flags().StringP("subject", "s", "", "The request's subject") + subjectCmd.Flags().StringP("action", "a", "", "The request's action") + subjectCmd.Flags().StringP("resource", "r", "", "The request's resource") }