From d66163c840860d085b688e7b1d6997b9e916cdbe Mon Sep 17 00:00:00 2001 From: liuyu <> Date: Mon, 9 Dec 2024 20:49:59 +0800 Subject: [PATCH] fix: updating password not applied --- pkg/apis/iam/v1alpha1/handler.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/apis/iam/v1alpha1/handler.go b/pkg/apis/iam/v1alpha1/handler.go index 1d442d8..cbb1c79 100644 --- a/pkg/apis/iam/v1alpha1/handler.go +++ b/pkg/apis/iam/v1alpha1/handler.go @@ -787,13 +787,14 @@ func (h *Handler) handleResetUserPassword(req *restful.Request, resp *restful.Re klog.Info("success to delete wizard") }() - _, err = iamClient.Users().Update(ctx, user, metav1.UpdateOptions{}) - if err != nil { - response.HandleError(resp, errors.Errorf("reset password: update user err, %v", err)) - return - } + } + _, err = iamClient.Users().Update(ctx, user, metav1.UpdateOptions{}) + if err != nil { + response.HandleError(resp, errors.Errorf("reset password: update user err, %v", err)) + return } + } else { admin, err := iamClient.Users().Get(ctx, constants.Username, metav1.GetOptions{}) if err != nil {