Merge lp:~dukrat/mailman/star_accept_these_nonmembers_override into lp:mailman/2.1

Proposed by Robert Arlt Jr.
Status: Needs review
Proposed branch: lp:~dukrat/mailman/star_accept_these_nonmembers_override
Merge into: lp:mailman/2.1
Diff against target: 131 lines (+55/-1)
5 files modified
Mailman/Gui/Privacy.py (+24/-0)
Mailman/Handlers/Moderate.py (+16/-0)
Mailman/MailList.py (+4/-0)
Mailman/Version.py (+1/-1)
Mailman/versions.py (+10/-0)
To merge this branch: bzr merge lp:~dukrat/mailman/star_accept_these_nonmembers_override
Reviewer Review Type Date Requested Status
Mark Sapiro design Disapprove
Review via email: mp+113779@code.launchpad.net

Description of the change

Adds options to have the *_these_nonmembers override the posting rights of members included in *_these_nonmembers on a per list per *_these_nonmembers basis.

To post a comment you must log in.
Revision history for this message
Mark Sapiro (msapiro) wrote :

I don't recall if I saw this proposal when it was first submitted. If I did, I apologize for not responding.

In any case, I'm not going to accept it because I really don't see the need for it. If you want *_these_nonmembers to apply to an address which is a member, just delete the member. Granted, there are corner cases, e.g. if Reply-To: is a member but From: isn't, where this might produce a different result, I still don't see it as a useful feature.

review: Disapprove (design)
Revision history for this message
Mark Sapiro (msapiro) wrote :

OK. thinking a bit further, I suppose you may not want to remove the member because you want her to still receive list mail.

You could still accomplish the same thing as a hold/reject/discard these_nonmembers override would by using header_filter_rules, and for accept_these_nonmembers overriding member_moderation_action, just unmoderate the member.

It there's something I'm missing here, please explain your use cases in more detail so I can understand the need.

Revision history for this message
Robert Arlt Jr. (dukrat) wrote :

It has been some years and I'm not actively using this so I could have some misconceptions at this point, but I do not believe the header_filter_rules will leverage the @list notation that the _these_nonmembers does.

The use case being the administrator of list x needs everyone on list y to be able to send to list x unmoderated. However, they do not moderate list y and do not have knowledge of who is on list y. Therefore they cannot know if any of list x members should be unmoderated nor would they know who the put in the header_filter_rules.

Revision history for this message
Mark Sapiro (msapiro) wrote :

I think I understand your use case, and I think you are correct that in this case, there is no way to accomplish the desired result with existing settings. I.e., if there is a member of list x who also happens to be a moderated member of list y, and that member should be allowed to post unmoderated to list y by virtue of being a member of list x, the admin of list y who is unaware of the membership of list x will not know to unmoderate the member on list y.

I note that you are at MIT, and I suspect that this could actually be a real case in a university environment. I.e. I run the radio club's list and the dean's 'special privileged people' should be able to post to my list unmoderated even though one of them is a moderated member of my list and I'm unaware that this is one of the dean's 'special privileged people'.

However, I see the need for this being so rare in practice that, university politics notwithstanding, it isn't worth the additional complexity and potential confusion that these extra settings would produce. Further, I see issues if both @deans_friends and <email address hidden> are in my list's accept_these_nonmembers with accept_these_nonmembers_override = Yes and at some later time <email address hidden> joins my list and then I want to moderate her for some reason and I am confused as to why moderating her is not effective because I've forgotten she's in accept_these_nonmembers with an override.

Unmerged revisions

1360. By root <email address hidden>

Adds options to have the *_these_nonmembers override the posting rights of members included in *_these_nonmembers on a per list per *_these_nonmembers basis.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Mailman/Gui/Privacy.py'
--- Mailman/Gui/Privacy.py 2009-01-11 16:06:13 +0000
+++ Mailman/Gui/Privacy.py 2012-07-06 17:31:20 +0000
@@ -253,6 +253,12 @@
253 Mailman list in this installation, all of whose member253 Mailman list in this installation, all of whose member
254 addresses will be accepted for this list.""")),254 addresses will be accepted for this list.""")),
255255
256 ('accept_these_nonmembers_override', mm_cfg.Radio,
257 (_('No'), _('Yes')), 0,
258 _("""If a member is listed in accept_these_nonmembers their
259 postings will be automatically accepted regardless of their user
260 moderation status""")),
261
256 ('hold_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,262 ('hold_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
257 _("""List of non-member addresses whose postings will be263 _("""List of non-member addresses whose postings will be
258 immediately held for moderation."""),264 immediately held for moderation."""),
@@ -264,6 +270,12 @@
264 line; start the line with a ^ character to designate a regular270 line; start the line with a ^ character to designate a regular
265 expression match.""")),271 expression match.""")),
266272
273 ('hold_these_nonmembers_override', mm_cfg.Radio,
274 (_('No'), _('Yes')), 0,
275 _("""If a member is listed in hold_these_nonmembers their postings
276 will be immedeiatly held for moderation regardless of their user
277 moderation status""")),
278
267 ('reject_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,279 ('reject_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
268 _("""List of non-member addresses whose postings will be280 _("""List of non-member addresses whose postings will be
269 automatically rejected."""),281 automatically rejected."""),
@@ -279,6 +291,12 @@
279 <p>Add member addresses one per line; start the line with a ^291 <p>Add member addresses one per line; start the line with a ^
280 character to designate a regular expression match.""")),292 character to designate a regular expression match.""")),
281293
294 ('reject_these_nonmembers_override', mm_cfg.Radio,
295 (_('No'), _('Yes')), 0,
296 _("""If a member is listed in reject_these_nonmembers their
297 postings will be automatically rejected regardless
298 of their user moderation status""")),
299
282 ('discard_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,300 ('discard_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
283 _("""List of non-member addresses whose postings will be301 _("""List of non-member addresses whose postings will be
284 automatically discarded."""),302 automatically discarded."""),
@@ -293,6 +311,12 @@
293 <p>Add member addresses one per line; start the line with a ^311 <p>Add member addresses one per line; start the line with a ^
294 character to designate a regular expression match.""")),312 character to designate a regular expression match.""")),
295313
314 ('discard_these_nonmembers_override', mm_cfg.Radio,
315 (_('No'), _('Yes')), 0,
316 _("""If a member is listed in discard_these_nonmembers their
317 postings will be automatically discarded regardless
318 of their user moderation status""")),
319
296 ('generic_nonmember_action', mm_cfg.Radio,320 ('generic_nonmember_action', mm_cfg.Radio,
297 (_('Accept'), _('Hold'), _('Reject'), _('Discard')), 0,321 (_('Accept'), _('Hold'), _('Reject'), _('Discard')), 0,
298 _("""Action to take for postings from non-members for which no322 _("""Action to take for postings from non-members for which no
299323
=== modified file 'Mailman/Handlers/Moderate.py'
--- Mailman/Handlers/Moderate.py 2011-01-25 01:16:17 +0000
+++ Mailman/Handlers/Moderate.py 2012-07-06 17:31:20 +0000
@@ -56,6 +56,22 @@
56 else:56 else:
57 sender = None57 sender = None
58 if sender:58 if sender:
59 listname = mlist.internal_name()
60 if mlist.accept_these_nonmembers_override == 1:
61 if matches_p(sender, mlist.accept_these_nonmembers, listname):
62 return
63 if mlist.hold_these_nonmembers_override == 1:
64 if matches_p(sender, mlist.hold_these_nonmembers, listname):
65 Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost)
66 # No return
67 if mlist.reject_these_nonmembers_override == 1:
68 if matches_p(sender, mlist.reject_these_nonmembers, listname):
69 do_reject(mlist)
70 # No return
71 if mlist.discard_these_nonmembers_override == 1:
72 if matches_p(sender, mlist.discard_these_nonmembers, listname):
73 do_discard(mlist, msg)
74 # No return
59 # If the member's moderation flag is on, then perform the moderation75 # If the member's moderation flag is on, then perform the moderation
60 # action.76 # action.
61 if mlist.getMemberOption(sender, mm_cfg.Moderate):77 if mlist.getMemberOption(sender, mm_cfg.Moderate):
6278
=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py 2012-06-20 23:32:30 +0000
+++ Mailman/MailList.py 2012-07-06 17:31:20 +0000
@@ -388,6 +388,10 @@
388 # 2==Discard388 # 2==Discard
389 self.member_moderation_action = 0389 self.member_moderation_action = 0
390 self.member_moderation_notice = ''390 self.member_moderation_notice = ''
391 self.accept_these_nonmembers_override = 0
392 self.hold_these_nonmembers_override = 0
393 self.reject_these_nonmembers_override = 0
394 self.discard_these_nonmembers_override = 0
391 self.accept_these_nonmembers = []395 self.accept_these_nonmembers = []
392 self.hold_these_nonmembers = []396 self.hold_these_nonmembers = []
393 self.reject_these_nonmembers = []397 self.reject_these_nonmembers = []
394398
=== modified file 'Mailman/Version.py'
--- Mailman/Version.py 2012-06-20 23:32:30 +0000
+++ Mailman/Version.py 2012-07-06 17:31:20 +0000
@@ -37,7 +37,7 @@
37 (REL_LEVEL << 4) | (REL_SERIAL << 0))37 (REL_LEVEL << 4) | (REL_SERIAL << 0))
3838
39# config.pck schema version number39# config.pck schema version number
40DATA_FILE_VERSION = 10040DATA_FILE_VERSION = 101
4141
42# qfile/*.db schema version number42# qfile/*.db schema version number
43QFILE_SCHEMA_VERSION = 343QFILE_SCHEMA_VERSION = 3
4444
=== modified file 'Mailman/versions.py'
--- Mailman/versions.py 2012-06-20 23:32:30 +0000
+++ Mailman/versions.py 2012-07-06 17:31:20 +0000
@@ -93,6 +93,16 @@
93 if not hasattr(l, newname) and newdefault is not uniqueval:93 if not hasattr(l, newname) and newdefault is not uniqueval:
94 setattr(l, newname, newdefault)94 setattr(l, newname, newdefault)
9595
96 # Patches for *_these_nonmembers_override
97 if not hasattr(l, 'accept_these_nonmembers_override'):
98 l.accept_these_nonmembers_override = 0
99 if not hasattr(l, 'hold_these_nonmembers_override'):
100 l.hold_these_nonmembers_override = 0
101 if not hasattr(l, 'reject_these_nonmembers_override'):
102 l.reject_these_nonmembers_override = 0
103 if not hasattr(l, 'discard_these_nonmembers_override'):
104 l.discard_these_nonmembers_override = 0
105
96 # Migrate to 2.1b3, baw 17-Aug-2001106 # Migrate to 2.1b3, baw 17-Aug-2001
97 if hasattr(l, 'dont_respond_to_post_requests'):107 if hasattr(l, 'dont_respond_to_post_requests'):
98 oldval = getattr(l, 'dont_respond_to_post_requests')108 oldval = getattr(l, 'dont_respond_to_post_requests')