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

Proposed by Robert Arlt Jr. on 2012-07-06
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 2012-07-06 Disapprove on 2016-01-17
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.
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)
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.

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.

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> on 2012-07-06

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
1=== modified file 'Mailman/Gui/Privacy.py'
2--- Mailman/Gui/Privacy.py 2009-01-11 16:06:13 +0000
3+++ Mailman/Gui/Privacy.py 2012-07-06 17:31:20 +0000
4@@ -253,6 +253,12 @@
5 Mailman list in this installation, all of whose member
6 addresses will be accepted for this list.""")),
7
8+ ('accept_these_nonmembers_override', mm_cfg.Radio,
9+ (_('No'), _('Yes')), 0,
10+ _("""If a member is listed in accept_these_nonmembers their
11+ postings will be automatically accepted regardless of their user
12+ moderation status""")),
13+
14 ('hold_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
15 _("""List of non-member addresses whose postings will be
16 immediately held for moderation."""),
17@@ -264,6 +270,12 @@
18 line; start the line with a ^ character to designate a regular
19 expression match.""")),
20
21+ ('hold_these_nonmembers_override', mm_cfg.Radio,
22+ (_('No'), _('Yes')), 0,
23+ _("""If a member is listed in hold_these_nonmembers their postings
24+ will be immedeiatly held for moderation regardless of their user
25+ moderation status""")),
26+
27 ('reject_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
28 _("""List of non-member addresses whose postings will be
29 automatically rejected."""),
30@@ -279,6 +291,12 @@
31 <p>Add member addresses one per line; start the line with a ^
32 character to designate a regular expression match.""")),
33
34+ ('reject_these_nonmembers_override', mm_cfg.Radio,
35+ (_('No'), _('Yes')), 0,
36+ _("""If a member is listed in reject_these_nonmembers their
37+ postings will be automatically rejected regardless
38+ of their user moderation status""")),
39+
40 ('discard_these_nonmembers', mm_cfg.EmailListEx, (10, WIDTH), 1,
41 _("""List of non-member addresses whose postings will be
42 automatically discarded."""),
43@@ -293,6 +311,12 @@
44 <p>Add member addresses one per line; start the line with a ^
45 character to designate a regular expression match.""")),
46
47+ ('discard_these_nonmembers_override', mm_cfg.Radio,
48+ (_('No'), _('Yes')), 0,
49+ _("""If a member is listed in discard_these_nonmembers their
50+ postings will be automatically discarded regardless
51+ of their user moderation status""")),
52+
53 ('generic_nonmember_action', mm_cfg.Radio,
54 (_('Accept'), _('Hold'), _('Reject'), _('Discard')), 0,
55 _("""Action to take for postings from non-members for which no
56
57=== modified file 'Mailman/Handlers/Moderate.py'
58--- Mailman/Handlers/Moderate.py 2011-01-25 01:16:17 +0000
59+++ Mailman/Handlers/Moderate.py 2012-07-06 17:31:20 +0000
60@@ -56,6 +56,22 @@
61 else:
62 sender = None
63 if sender:
64+ listname = mlist.internal_name()
65+ if mlist.accept_these_nonmembers_override == 1:
66+ if matches_p(sender, mlist.accept_these_nonmembers, listname):
67+ return
68+ if mlist.hold_these_nonmembers_override == 1:
69+ if matches_p(sender, mlist.hold_these_nonmembers, listname):
70+ Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost)
71+ # No return
72+ if mlist.reject_these_nonmembers_override == 1:
73+ if matches_p(sender, mlist.reject_these_nonmembers, listname):
74+ do_reject(mlist)
75+ # No return
76+ if mlist.discard_these_nonmembers_override == 1:
77+ if matches_p(sender, mlist.discard_these_nonmembers, listname):
78+ do_discard(mlist, msg)
79+ # No return
80 # If the member's moderation flag is on, then perform the moderation
81 # action.
82 if mlist.getMemberOption(sender, mm_cfg.Moderate):
83
84=== modified file 'Mailman/MailList.py'
85--- Mailman/MailList.py 2012-06-20 23:32:30 +0000
86+++ Mailman/MailList.py 2012-07-06 17:31:20 +0000
87@@ -388,6 +388,10 @@
88 # 2==Discard
89 self.member_moderation_action = 0
90 self.member_moderation_notice = ''
91+ self.accept_these_nonmembers_override = 0
92+ self.hold_these_nonmembers_override = 0
93+ self.reject_these_nonmembers_override = 0
94+ self.discard_these_nonmembers_override = 0
95 self.accept_these_nonmembers = []
96 self.hold_these_nonmembers = []
97 self.reject_these_nonmembers = []
98
99=== modified file 'Mailman/Version.py'
100--- Mailman/Version.py 2012-06-20 23:32:30 +0000
101+++ Mailman/Version.py 2012-07-06 17:31:20 +0000
102@@ -37,7 +37,7 @@
103 (REL_LEVEL << 4) | (REL_SERIAL << 0))
104
105 # config.pck schema version number
106-DATA_FILE_VERSION = 100
107+DATA_FILE_VERSION = 101
108
109 # qfile/*.db schema version number
110 QFILE_SCHEMA_VERSION = 3
111
112=== modified file 'Mailman/versions.py'
113--- Mailman/versions.py 2012-06-20 23:32:30 +0000
114+++ Mailman/versions.py 2012-07-06 17:31:20 +0000
115@@ -93,6 +93,16 @@
116 if not hasattr(l, newname) and newdefault is not uniqueval:
117 setattr(l, newname, newdefault)
118
119+ # Patches for *_these_nonmembers_override
120+ if not hasattr(l, 'accept_these_nonmembers_override'):
121+ l.accept_these_nonmembers_override = 0
122+ if not hasattr(l, 'hold_these_nonmembers_override'):
123+ l.hold_these_nonmembers_override = 0
124+ if not hasattr(l, 'reject_these_nonmembers_override'):
125+ l.reject_these_nonmembers_override = 0
126+ if not hasattr(l, 'discard_these_nonmembers_override'):
127+ l.discard_these_nonmembers_override = 0
128+
129 # Migrate to 2.1b3, baw 17-Aug-2001
130 if hasattr(l, 'dont_respond_to_post_requests'):
131 oldval = getattr(l, 'dont_respond_to_post_requests')

Subscribers

People subscribed via source and target branches