Merge lp:~jimmy-sigint/mailman/restapi_additional_attributes into lp:mailman

Proposed by Jimmy Bergman
Status: Merged
Merge reported by: Barry Warsaw
Merged at revision: not available
Proposed branch: lp:~jimmy-sigint/mailman/restapi_additional_attributes
Merge into: lp:mailman
Diff against target: 134 lines (+29/-0)
2 files modified
src/mailman/rest/configuration.py (+8/-0)
src/mailman/rest/docs/configuration.txt (+21/-0)
To merge this branch: bzr merge lp:~jimmy-sigint/mailman/restapi_additional_attributes
Reviewer Review Type Date Requested Status
Barry Warsaw Approve
Review via email: mp+38390@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Thanks for the great contribution. It took me a while to merge it because I realized that some of the things this branch touched had not been fully fleshed out. Now, member moderation should be functional but non-member moderation still needs some work. But your branch was great, and it is now merged!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/rest/configuration.py'
2--- src/mailman/rest/configuration.py 2010-09-01 14:39:36 +0000
3+++ src/mailman/rest/configuration.py 2010-10-14 07:31:44 +0000
4@@ -29,8 +29,10 @@
5 from restish import http, resource
6
7 from mailman.config import config
8+from mailman.interfaces.action import Action
9 from mailman.interfaces.autorespond import ResponseAction
10 from mailman.interfaces.mailinglist import IAcceptableAliasSet
11+from mailman.interfaces.mailinglist import ReplyToMunging
12 from mailman.rest.helpers import PATCH, etag
13 from mailman.rest.validator import Validator, enum_validator
14
15@@ -173,11 +175,13 @@
16 collapse_alternatives=GetterSetter(as_boolean),
17 convert_html_to_plaintext=GetterSetter(as_boolean),
18 created_at=GetterSetter(None),
19+ default_member_moderation=GetterSetter(as_boolean),
20 description=GetterSetter(unicode),
21 digest_last_sent_at=GetterSetter(None),
22 digest_size_threshold=GetterSetter(float),
23 filter_content=GetterSetter(as_boolean),
24 fqdn_listname=GetterSetter(None),
25+ generic_nonmember_action=GetterSetter(int),
26 host_name=GetterSetter(None),
27 include_list_post_header=GetterSetter(as_boolean),
28 include_rfc2369_headers=GetterSetter(as_boolean),
29@@ -186,6 +190,7 @@
30 leave_address=GetterSetter(None),
31 list_id=GetterSetter(None),
32 list_name=GetterSetter(None),
33+ member_moderation_action=GetterSetter(enum_validator(Action)),
34 next_digest_number=GetterSetter(None),
35 no_reply_address=GetterSetter(None),
36 owner_address=GetterSetter(None),
37@@ -193,10 +198,13 @@
38 post_id=GetterSetter(None),
39 posting_address=GetterSetter(None),
40 real_name=GetterSetter(unicode),
41+ reply_goes_to_list=GetterSetter(enum_validator(ReplyToMunging)),
42 request_address=GetterSetter(None),
43 scheme=GetterSetter(None),
44+ send_welcome_msg=GetterSetter(as_boolean),
45 volume=GetterSetter(None),
46 web_host=GetterSetter(None),
47+ welcome_msg=GetterSetter(unicode),
48 )
49
50
51
52=== modified file 'src/mailman/rest/docs/configuration.txt'
53--- src/mailman/rest/docs/configuration.txt 2010-09-15 15:37:54 +0000
54+++ src/mailman/rest/docs/configuration.txt 2010-10-14 07:31:44 +0000
55@@ -32,11 +32,13 @@
56 collapse_alternatives: True
57 convert_html_to_plaintext: False
58 created_at: 20...T...
59+ default_member_moderation: False
60 description:
61 digest_last_sent_at: None
62 digest_size_threshold: 30.0
63 filter_content: False
64 fqdn_listname: test-one@example.com
65+ generic_nonmember_action: 1
66 host_name: example.com
67 http_etag: "..."
68 include_list_post_header: True
69@@ -46,6 +48,7 @@
70 leave_address: test-one-leave@example.com
71 list_id: test-one.example.com
72 list_name: test-one
73+ member_moderation_action: hold
74 next_digest_number: 1
75 no_reply_address: noreply@example.com
76 owner_address: test-one-owner@example.com
77@@ -53,10 +56,13 @@
78 post_id: 1
79 posting_address: test-one@example.com
80 real_name: Test-one
81+ reply_goes_to_list: no_munging
82 request_address: test-one-request@example.com
83 scheme: http
84+ send_welcome_msg: True
85 volume: 1
86 web_host: lists.example.com
87+ welcome_msg:
88
89
90 Changing the full configuration
91@@ -91,6 +97,12 @@
92 ... filter_content=True,
93 ... convert_html_to_plaintext=True,
94 ... collapse_alternatives=False,
95+ ... reply_goes_to_list='point_to_list',
96+ ... send_welcome_msg=True,
97+ ... welcome_msg='welcome message',
98+ ... member_moderation_action='reject',
99+ ... default_member_moderation=True,
100+ ... generic_nonmember_action=2,
101 ... ),
102 ... 'PUT')
103 content-length: 0
104@@ -119,6 +131,7 @@
105 collapse_alternatives: False
106 convert_html_to_plaintext: True
107 ...
108+ default_member_moderation: True
109 description: This is my mailing list
110 ...
111 digest_size_threshold: 10.5
112@@ -130,7 +143,9 @@
113 pipeline: virgin
114 ...
115 real_name: Fnords
116+ reply_goes_to_list: point_to_list
117 ...
118+ welcome_msg: welcome message
119
120 If you use ``PUT`` to change a list's configuration, all writable attributes
121 must be included. It is an error to leave one or more out...
122@@ -160,6 +175,12 @@
123 ... filter_content=True,
124 ... convert_html_to_plaintext=True,
125 ... collapse_alternatives=False,
126+ ... reply_goes_to_list='point_to_list',
127+ ... send_welcome_msg=True,
128+ ... welcome_msg='welcome message',
129+ ... member_moderation_action='reject',
130+ ... default_member_moderation=True,
131+ ... generic_nonmember_action=2,
132 ... ),
133 ... 'PUT')
134 Traceback (most recent call last):