Refactor code

This commit is contained in:
wenxu12345
2021-12-30 12:05:10 +08:00
parent 9409d6e05e
commit 4336a1a13e
3 changed files with 23 additions and 6 deletions
@@ -210,6 +210,19 @@ func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
return groupIDList, nil
}
func IsGroupOwnerAdmin(groupID, UserID string) bool {
groupMemberList, err := GetOwnerManagerByGroupID(groupID)
if err != nil {
return false
}
for _, v := range groupMemberList {
if v.UserID == UserID && v.RoleLevel > constant.GroupOrdinaryUsers {
return true
}
}
return false
}
//
//func SelectGroupList(groupID string) ([]string, error) {
// var groupUserID string