diff options
| author | Barry Warsaw | 2015-04-03 11:12:41 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-03 11:12:41 -0400 |
| commit | 0e6ad6fbaedaf9f0e8fd81f481044de70ca508b6 (patch) | |
| tree | 69d05264ad2f5d663c2aea0606232bb43f85e320 | |
| parent | 017decd6fb8288ec498a4ab32be2273699c7cdaf (diff) | |
| parent | f75287d17af321a5ee85c499688a5c7ad0aae589 (diff) | |
| download | mailman-0e6ad6fbaedaf9f0e8fd81f481044de70ca508b6.tar.gz mailman-0e6ad6fbaedaf9f0e8fd81f481044de70ca508b6.tar.zst mailman-0e6ad6fbaedaf9f0e8fd81f481044de70ca508b6.zip | |
| -rw-r--r-- | src/mailman/rest/docs/listconf.rst | 3 | ||||
| -rw-r--r-- | src/mailman/rest/listconf.py | 4 | ||||
| -rw-r--r-- | src/mailman/rest/tests/test_listconf.py | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/mailman/rest/docs/listconf.rst b/src/mailman/rest/docs/listconf.rst index 841ab3c27..bcf4f856e 100644 --- a/src/mailman/rest/docs/listconf.rst +++ b/src/mailman/rest/docs/listconf.rst @@ -61,6 +61,7 @@ All readable attributes for a list are available on a sub-resource. scheme: http send_welcome_message: True subject_prefix: [Ant] + subscription_policy: confirm volume: 1 web_host: lists.example.com welcome_message_uri: mailman:///welcome.txt @@ -106,6 +107,7 @@ When using ``PUT``, all writable attributes must be included. ... reply_to_address='bee@example.com', ... send_welcome_message=False, ... subject_prefix='[ant]', + ... subscription_policy='moderate', ... welcome_message_uri='mailman:///welcome.txt', ... default_member_action='hold', ... default_nonmember_action='discard', @@ -156,6 +158,7 @@ These values are changed permanently. ... send_welcome_message: False subject_prefix: [ant] + subscription_policy: moderate ... welcome_message_uri: mailman:///welcome.txt diff --git a/src/mailman/rest/listconf.py b/src/mailman/rest/listconf.py index e83f52833..92d1169d4 100644 --- a/src/mailman/rest/listconf.py +++ b/src/mailman/rest/listconf.py @@ -29,7 +29,8 @@ from mailman.core.errors import ( from mailman.interfaces.action import Action from mailman.interfaces.archiver import ArchivePolicy from mailman.interfaces.autorespond import ResponseAction -from mailman.interfaces.mailinglist import IAcceptableAliasSet, ReplyToMunging +from mailman.interfaces.mailinglist import ( + IAcceptableAliasSet, ReplyToMunging, SubscriptionPolicy) from mailman.rest.helpers import ( GetterSetter, bad_request, etag, no_content, okay) from mailman.rest.validator import PatchValidator, Validator, enum_validator @@ -142,6 +143,7 @@ ATTRIBUTES = dict( scheme=GetterSetter(None), send_welcome_message=GetterSetter(as_boolean), subject_prefix=GetterSetter(str), + subscription_policy=GetterSetter(enum_validator(SubscriptionPolicy)), volume=GetterSetter(None), web_host=GetterSetter(None), welcome_message_uri=GetterSetter(str), diff --git a/src/mailman/rest/tests/test_listconf.py b/src/mailman/rest/tests/test_listconf.py index b0107b199..ddb43a8ea 100644 --- a/src/mailman/rest/tests/test_listconf.py +++ b/src/mailman/rest/tests/test_listconf.py @@ -79,6 +79,7 @@ class TestConfiguration(unittest.TestCase): reply_to_address='bee@example.com', send_welcome_message=False, subject_prefix='[ant]', + subscription_policy='confirm_then_moderate', welcome_message_uri='mailman:///welcome.txt', default_member_action='hold', default_nonmember_action='discard', |
