Skip to content

Commit 6962cdc

Browse files
committed
Fix lookup and add deprecation warning
1 parent db39191 commit 6962cdc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: internal/commands/permission.go

+4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,13 @@ func RegisterPermissionCmd(rootCmd *cobra.Command) *cobra.Command {
9191
expandCmd.Flags().String("revision", "", "optional revision at which to check")
9292
registerConsistencyFlags(expandCmd.Flags())
9393

94+
// NOTE: `lookup` is an alias of `lookup-resources` (below)
95+
// and must have the same list of flags in order for it to work.
9496
permissionCmd.AddCommand(lookupCmd)
9597
lookupCmd.Flags().Bool("json", false, "output as JSON")
9698
lookupCmd.Flags().String("revision", "", "optional revision at which to check")
9799
lookupCmd.Flags().String("caveat-context", "", "the caveat context to send along with the lookup, in JSON form")
100+
lookupCmd.Flags().Uint32("page-limit", 0, "limit of relations returned per page")
98101
registerConsistencyFlags(lookupCmd.Flags())
99102

100103
permissionCmd.AddCommand(lookupResourcesCmd)
@@ -156,6 +159,7 @@ var lookupCmd = &cobra.Command{
156159
Args: cobra.ExactArgs(3),
157160
ValidArgsFunction: GetArgs(ResourceType, Permission, SubjectID),
158161
RunE: lookupResourcesCmdFunc,
162+
Deprecated: "prefer lookup-resources",
159163
Hidden: true,
160164
}
161165

0 commit comments

Comments
 (0)