Merge lp:~abompard/mailman/subpolicy into lp:~barry/mailman/subpolicy-2

Proposed by Aurélien Bompard
Status: Merged
Merged at revision: 7321
Proposed branch: lp:~abompard/mailman/subpolicy
Merge into: lp:~barry/mailman/subpolicy-2
Diff against target: 61 lines (+7/-1)
3 files modified
src/mailman/rest/docs/listconf.rst (+3/-0)
src/mailman/rest/listconf.py (+3/-1)
src/mailman/rest/tests/test_listconf.py (+1/-0)
To merge this branch: bzr merge lp:~abompard/mailman/subpolicy
Reviewer Review Type Date Requested Status
Barry Warsaw Pending
Review via email: mp+254722@code.launchpad.net
To post a comment you must log in.
lp:~abompard/mailman/subpolicy updated
7321. By Barry Warsaw

Plumb subscription policy through to the REST API. Given by abompard.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/rest/docs/listconf.rst'
2--- src/mailman/rest/docs/listconf.rst 2015-01-05 01:20:33 +0000
3+++ src/mailman/rest/docs/listconf.rst 2015-03-31 10:42:37 +0000
4@@ -61,6 +61,7 @@
5 scheme: http
6 send_welcome_message: True
7 subject_prefix: [Ant]
8+ subscription_policy: confirm
9 volume: 1
10 web_host: lists.example.com
11 welcome_message_uri: mailman:///welcome.txt
12@@ -106,6 +107,7 @@
13 ... reply_to_address='bee@example.com',
14 ... send_welcome_message=False,
15 ... subject_prefix='[ant]',
16+ ... subscription_policy='moderate',
17 ... welcome_message_uri='mailman:///welcome.txt',
18 ... default_member_action='hold',
19 ... default_nonmember_action='discard',
20@@ -156,6 +158,7 @@
21 ...
22 send_welcome_message: False
23 subject_prefix: [ant]
24+ subscription_policy: moderate
25 ...
26 welcome_message_uri: mailman:///welcome.txt
27
28
29=== modified file 'src/mailman/rest/listconf.py'
30--- src/mailman/rest/listconf.py 2015-01-05 01:40:47 +0000
31+++ src/mailman/rest/listconf.py 2015-03-31 10:42:37 +0000
32@@ -29,7 +29,8 @@
33 from mailman.interfaces.action import Action
34 from mailman.interfaces.archiver import ArchivePolicy
35 from mailman.interfaces.autorespond import ResponseAction
36-from mailman.interfaces.mailinglist import IAcceptableAliasSet, ReplyToMunging
37+from mailman.interfaces.mailinglist import (
38+ IAcceptableAliasSet, ReplyToMunging, SubscriptionPolicy)
39 from mailman.rest.helpers import (
40 GetterSetter, bad_request, etag, no_content, okay)
41 from mailman.rest.validator import PatchValidator, Validator, enum_validator
42@@ -142,6 +143,7 @@
43 scheme=GetterSetter(None),
44 send_welcome_message=GetterSetter(as_boolean),
45 subject_prefix=GetterSetter(str),
46+ subscription_policy=GetterSetter(enum_validator(SubscriptionPolicy)),
47 volume=GetterSetter(None),
48 web_host=GetterSetter(None),
49 welcome_message_uri=GetterSetter(str),
50
51=== modified file 'src/mailman/rest/tests/test_listconf.py'
52--- src/mailman/rest/tests/test_listconf.py 2015-01-05 01:22:39 +0000
53+++ src/mailman/rest/tests/test_listconf.py 2015-03-31 10:42:37 +0000
54@@ -79,6 +79,7 @@
55 reply_to_address='bee@example.com',
56 send_welcome_message=False,
57 subject_prefix='[ant]',
58+ subscription_policy='confirm_then_moderate',
59 welcome_message_uri='mailman:///welcome.txt',
60 default_member_action='hold',
61 default_nonmember_action='discard',

Subscribers

People subscribed via source and target branches