diff --git a/pkg/auth/registry/apikey/storage/storage.go b/pkg/auth/registry/apikey/storage/storage.go index ee5101a4d..fda0359a9 100644 --- a/pkg/auth/registry/apikey/storage/storage.go +++ b/pkg/auth/registry/apikey/storage/storage.go @@ -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) }