变更版本

This commit is contained in:
刘祥超
2021-01-03 21:37:47 +08:00
parent 70c1ee2984
commit 079f9de92f
5 changed files with 38 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ func (this *BaseService) ValidateAdminAndUser(ctx context.Context, requireAdminI
switch reqUserType {
case rpcutils.UserTypeAdmin:
adminId = reqUserId
if adminId <= 0 {
if adminId < 0 { // 允许AdminId = 0
err = errors.New("invalid 'adminId'")
return
}