From 902dd74ca121298359ffce3839386285807433d7 Mon Sep 17 00:00:00 2001 From: leonarliu Date: Fri, 17 Dec 2021 11:17:27 +0800 Subject: [PATCH] fix(auth): delete user is blocked in controller --- pkg/auth/registry/apikey/storage/storage.go | 3 --- 1 file changed, 3 deletions(-) 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) }