humingcheng commented on code in PR #1507:
URL:
https://github.com/apache/servicecomb-service-center/pull/1507#discussion_r2166619103
##########
server/service/rbac/account_service.go:
##########
@@ -188,11 +189,16 @@ func EditAccount(ctx context.Context, a
*rbacmodel.Account) error {
return nil
}
-func checkRoleNames(ctx context.Context, roles []string) error {
- for _, name := range roles {
- exist, err := RoleExist(ctx, name)
+func checkRoles(ctx context.Context, a *rbacmodel.Account) error {
+ for _, roleName := range a.Roles {
Review Comment:
root要求有且仅有一个admin的role,这里漏掉了缺失role的场景
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]