Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Fix moderation #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions Products/GSGroupMember/groupMembersInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,19 @@ def moderatees(self):
else:
retval.append(createObject('groupserver.UserFromId',
self.context, uId))
elif not(self.mlistInfo.is_moderate_new):
for u in self.fullMembers:
isPtnCoach = self.ptnCoach and (self.ptnCoach.id == u.id)\
or False
isGrpAdmin = u.id in [a.id for a in self.groupAdmins]
isSiteAdmin = u.id in [a.id for a in self.siteAdmins]
isModerator = u.id in [m.id for m in self.moderators]
isBlocked = u.id in [m.id for m in self.blockedMembers]
if (not(isSiteAdmin) and not(isGrpAdmin) and
not(isPtnCoach) and not(isModerator) and
not(isBlocked)):
retval.append(u)
#We do not want to moderate all members if no members are moderated
#elif not(self.mlistInfo.is_moderate_new):
# for u in self.fullMembers:
# isPtnCoach = self.ptnCoach and (self.ptnCoach.id == u.id)\
# or False
# isGrpAdmin = u.id in [a.id for a in self.groupAdmins]
# isSiteAdmin = u.id in [a.id for a in self.siteAdmins]
# isModerator = u.id in [m.id for m in self.moderators]
# isBlocked = u.id in [m.id for m in self.blockedMembers]
# if (not(isSiteAdmin) and not(isGrpAdmin) and
# not(isPtnCoach) and not(isModerator) and
# not(isBlocked)):
# retval.append(u)
return retval

@Lazy
Expand Down