Skip to content

Commit

Permalink
fix(auth): delete user is blocked in controller (#1720)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoryu committed Dec 17, 2021
1 parent c919c90 commit 7e1f45d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/auth/registry/apikey/storage/storage.go
Expand Up @@ -150,9 +150,6 @@ func (r *REST) List(ctx context.Context, options *metainternal.ListOptions) (run
// DeleteCollection selects all resources in the storage matching given 'listOptions'
// and deletes them.
func (r *REST) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *metainternal.ListOptions) (runtime.Object, error) {
if !authentication.IsAdministrator(ctx, r.privilegedUsername) {
return nil, apierrors.NewMethodNotSupported(auth.Resource("apiKeys"), "delete collection")
}
return r.Store.DeleteCollection(ctx, deleteValidation, options, listOptions)
}

Expand Down

0 comments on commit 7e1f45d

Please sign in to comment.