From 269ae7fcdcbdb5a4726cb61c74ab30b6ad8a8a42 Mon Sep 17 00:00:00 2001 From: Oleksandr Andriienko Date: Sun, 14 Feb 2021 23:05:49 +0200 Subject: [PATCH] Fix up. Signed-off-by: Oleksandr Andriienko --- pkg/controller/che/oauth_initial_htpasswd_provider.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/che/oauth_initial_htpasswd_provider.go b/pkg/controller/che/oauth_initial_htpasswd_provider.go index 13a02a8fa..f1676f981 100644 --- a/pkg/controller/che/oauth_initial_htpasswd_provider.go +++ b/pkg/controller/che/oauth_initial_htpasswd_provider.go @@ -115,10 +115,6 @@ func (iuh *OpenShiftOAuthUserOperatorHandler) DeleteOAuthInitialUser(deployConte cr := deployContext.CheCluster userName := deploy.DefaultCheFlavor(cr) - if err := deploy.DeleteSecret(htpasswdSecretName, ocConfigNamespace, iuh.runtimeClient); err != nil { - return err - } - if err := deleteUser(iuh.runtimeClient, userName); err != nil { return err } @@ -131,6 +127,10 @@ func (iuh *OpenShiftOAuthUserOperatorHandler) DeleteOAuthInitialUser(deployConte return err } + if err := deploy.DeleteSecret(htpasswdSecretName, ocConfigNamespace, iuh.runtimeClient); err != nil { + return err + } + if err := deploy.DeleteSecret(openShiftOAuthUserCredentialsSecret, cr.Namespace, iuh.runtimeClient); err != nil { return err }