humingcheng commented on code in PR #1506:
URL: 
https://github.com/apache/servicecomb-service-center/pull/1506#discussion_r2161716713


##########
server/service/rbac/account_service_test.go:
##########
@@ -193,11 +194,11 @@ func TestUpdateAccount(t *testing.T) {
        })
        t.Run("update self, should return: 
"+rbac.NewError(rbac.ErrForbidOperateSelfAccount, "").Error(), func(t 
*testing.T) {
                name := "TestDeleteAccount_update_self"
-               a := newAccount(name)
+               a := newAdminAccount(name)

Review Comment:
   已有的用例不要改,不然含义都变了



##########
server/service/rbac/password.go:
##########
@@ -40,20 +41,29 @@ func ChangePassword(ctx context.Context, a *rbac.Account) 
error {
                return discovery.NewError(discovery.ErrInternal, err.Error())
        }
 
-       // change self password, need to check password mismatch
-       if changer.Name == a.Name {
-               return changePassword(ctx, a.Name, a.CurrentPassword, 
a.Password)
+       // non-admin user can only change self

Review Comment:
   修改者: admin,非admin;被修改者:admin/非admin/自己,这几种改密码场景都要覆盖



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@servicecomb.apache.org

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

Reply via email to