From 0a1558d5acefdf0d532a49dfdb681b3240ed6fc3 Mon Sep 17 00:00:00 2001 From: Abhishek K <32607604+abhishek9686@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:24:18 +0530 Subject: [PATCH] NET-1227: fix update password on update user handler (#3077) * add list roles to pro and ce * if not pro set user role to admin * validate update user * add separate validation check for password on update * remove validate check --- logic/auth.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/logic/auth.go b/logic/auth.go index d0642cff0..3da9f605d 100644 --- a/logic/auth.go +++ b/logic/auth.go @@ -268,10 +268,6 @@ func UpdateUser(userchange, user *models.User) (*models.User, error) { if _, err := GetUser(user.UserName); err != nil { return &models.User{}, err } - err := ValidateUser(userchange) - if err != nil { - return &models.User{}, err - } queryUser := user.UserName if userchange.UserName != "" && user.UserName != userchange.UserName { @@ -309,7 +305,7 @@ func UpdateUser(userchange, user *models.User) (*models.User, error) { } user.UserGroups = userchange.UserGroups user.NetworkRoles = userchange.NetworkRoles - err = ValidateUser(user) + err := ValidateUser(user) if err != nil { return &models.User{}, err }