From 9cb3b63069110f49fb77ae8fbe67f31a9bf70358 Mon Sep 17 00:00:00 2001 From: Joe Terranova Date: Mon, 27 Mar 2017 15:41:55 -0400 Subject: [PATCH] Do not moderate all members if moderation list is empty --- Products/GSGroup/mailinglistinfo.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Products/GSGroup/mailinglistinfo.py b/Products/GSGroup/mailinglistinfo.py index 950eac4..4c4fde5 100644 --- a/Products/GSGroup/mailinglistinfo.py +++ b/Products/GSGroup/mailinglistinfo.py @@ -99,13 +99,6 @@ def get_moderatees(self): """ Find and return all moderated members as a list of userInfo objects. The userIds of specified moderated members are assumed to be stored in a property called 'moderated_members' of type 'lines'. - If this property does not exist or does not contain any userIds, then - there are two possibilities: either no members are moderated, or all - group members (other than administrators, moderators and the ptn coach) - are moderated. - The deciding factor is whether 'Moderate New Members' is on: - - If so, then it is assumed that *no members* are being moderated. - - If not, then it is assumed that *all normal members* are moderated. """ members = [] if self.is_moderated: @@ -116,12 +109,13 @@ def get_moderatees(self): members = \ [ createObject('groupserver.UserFromId', self.context, uid) for uid in moderated_ids if uid in memberIds ] - elif not(self.is_moderate_new): - members = \ - [ u for u in group_members - if (not(user_admin_of_group(u, self.groupInfo)) - and not(user_participation_coach_of_group(u, self.groupInfo) - and (u not in self.moderators) and (u not in self.blocked_members))) ] + #We do not want to moderate all members + #elif not(self.is_moderate_new): + # members = \ + # [ u for u in group_members + # if (not(user_admin_of_group(u, self.groupInfo)) + # and not(user_participation_coach_of_group(u, self.groupInfo) + # and (u not in self.moderators) and (u not in self.blocked_members))) ] members.sort(sort_by_name) assert type(members) == list return members