mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
e39312828c
commit
28ef79f371
@ -513,7 +513,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool {
|
||||
return false
|
||||
|
||||
}
|
||||
if groupUserInfo.RoleLevel == constant.GroupAdmin {
|
||||
if groupUserInfo.RoleLevel == constant.GroupOwner || groupUserInfo.RoleLevel == constant.GroupAdmin {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@ -522,7 +522,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool {
|
||||
func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) {
|
||||
log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String())
|
||||
if !hasAccess(req) {
|
||||
log.NewError(req.OperationID, "no access ")
|
||||
log.NewError(req.OperationID, "no access ", req)
|
||||
return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user