diff --git a/domain/model/group_m/mic.go b/domain/model/group_m/mic.go index 9f2ce79b599c340aa257efa9157ea257dad47244..4d40b3abd31fb62fff5b00f3cefd65a73a40840a 100644 --- a/domain/model/group_m/mic.go +++ b/domain/model/group_m/mic.go @@ -291,10 +291,15 @@ func (micUser *MicUser) leave(operateUserId uint64, operateExternalId string) er } // externalId := micUser.ExternalId - if micUser.ExternalId != operateExternalId { - //检查权限,管理人权限, 不过不拥有管理人权限,则抛出错误 - if err := MgrPermission(micUser.model, micUser.GroupUuid, operateUserId, micUser.UserId); err != nil { - return err + // 超管处理 + if flag, err := user_m.IsSuperManagerV2(micUser.model, operateUserId, micUser.UserId); err != nil { + return err + } else if !flag { + if micUser.ExternalId != operateExternalId { + //检查权限,管理人权限, 不过不拥有管理人权限,则抛出错误 + if err := MgrPermission(micUser.model, micUser.GroupUuid, operateUserId, micUser.UserId); err != nil { + return err + } } } //设置值到redis