Exemple #1
0
func (cmd *update) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx)
	cmd.PermissionFlag.Register(ctx, f)

	f.StringVar(&cmd.name, "name", "", "Change role name")
	f.BoolVar(&cmd.remove, "r", false, "Remove given PRIVILEGE(s)")
	f.BoolVar(&cmd.add, "a", false, "Remove given PRIVILEGE(s)")
}
Exemple #2
0
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx)
	cmd.PermissionFlag.Register(ctx, f)
}
Exemple #3
0
func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx)
	cmd.PermissionFlag.Register(ctx, f)

	f.BoolVar(&cmd.force, "force", false, "Force removal if role is in use")
}