You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/06/02 06:01:29 UTC

[GitHub] [servicecomb-service-center] humingcheng commented on a change in pull request #1034: change password force only when admin role change other users

humingcheng commented on a change in pull request #1034:
URL: https://github.com/apache/servicecomb-service-center/pull/1034#discussion_r643674965



##########
File path: server/service/rbac/password.go
##########
@@ -43,9 +43,9 @@ func ChangePassword(ctx context.Context, a *rbac.Account) error {
 	}
 
 	// authority has been checked before
-	// admin role can change any user password without supply current password
+	// admin role can change any user(except itself) password without supply current password
 	for _, r := range changer.Roles {
-		if r == rbac.RoleAdmin {
+		if r == rbac.RoleAdmin && changer.Name != a.Name {

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org