diff --git a/pkg/webhook/validatingwebhook/validate_k8simagepuller_request.go b/pkg/webhook/validatingwebhook/validate_k8simagepuller_request.go index 061d3f75..f0f07492 100644 --- a/pkg/webhook/validatingwebhook/validate_k8simagepuller_request.go +++ b/pkg/webhook/validatingwebhook/validate_k8simagepuller_request.go @@ -5,7 +5,6 @@ import ( "html" "io" "net/http" - "strings" toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1" @@ -51,11 +50,6 @@ func (v K8sImagePullerRequestValidator) validate(body []byte) []byte { log.Error(err, "unable to deserialize the admission review object", "body", escapedBody) return denyAdmissionRequest(admReview, errors.Wrapf(err, "unable to deserialize the admission review object - body: %v", escapedBody)) } - requestingUsername := admReview.Request.UserInfo.Username - // allow admission request if the user is a system user - if strings.HasPrefix(requestingUsername, "system:") { - return allowAdmissionRequest(admReview) - } //check if the requesting user is a sandbox user requestingUser := &userv1.User{} err := v.Client.Get(context.TODO(), types.NamespacedName{