summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2010-10-13 16:06:45 +0200
committerroot2010-10-13 16:06:45 +0200
commit13cf4e754334b690711511291f72ae8cc0a7ab16 (patch)
tree7aa851339bb8b5e738ac606085f78a028d377412
parent1ad87091c3fdbf4be7dec33fc31d3a2c767a8f35 (diff)
downloadmailman-13cf4e754334b690711511291f72ae8cc0a7ab16.tar.gz
mailman-13cf4e754334b690711511291f72ae8cc0a7ab16.tar.zst
mailman-13cf4e754334b690711511291f72ae8cc0a7ab16.zip
-rw-r--r--src/mailman/rest/configuration.py8
-rw-r--r--src/mailman/rest/docs/configuration.txt21
2 files changed, 29 insertions, 0 deletions
diff --git a/src/mailman/rest/configuration.py b/src/mailman/rest/configuration.py
index 05a062b02..36167720d 100644
--- a/src/mailman/rest/configuration.py
+++ b/src/mailman/rest/configuration.py
@@ -29,8 +29,10 @@ from lazr.config import as_boolean, as_timedelta
from restish import http, resource
from mailman.config import config
+from mailman.interfaces.action import Action
from mailman.interfaces.autorespond import ResponseAction
from mailman.interfaces.mailinglist import IAcceptableAliasSet
+from mailman.interfaces.mailinglist import ReplyToMunging
from mailman.rest.helpers import PATCH, etag
from mailman.rest.validator import Validator, enum_validator
@@ -173,11 +175,13 @@ ATTRIBUTES = dict(
collapse_alternatives=GetterSetter(as_boolean),
convert_html_to_plaintext=GetterSetter(as_boolean),
created_at=GetterSetter(None),
+ default_member_moderation=GetterSetter(as_boolean),
description=GetterSetter(unicode),
digest_last_sent_at=GetterSetter(None),
digest_size_threshold=GetterSetter(float),
filter_content=GetterSetter(as_boolean),
fqdn_listname=GetterSetter(None),
+ generic_nonmember_action=GetterSetter(int),
host_name=GetterSetter(None),
include_list_post_header=GetterSetter(as_boolean),
include_rfc2369_headers=GetterSetter(as_boolean),
@@ -186,6 +190,7 @@ ATTRIBUTES = dict(
leave_address=GetterSetter(None),
list_id=GetterSetter(None),
list_name=GetterSetter(None),
+ member_moderation_action=GetterSetter(enum_validator(Action)),
next_digest_number=GetterSetter(None),
no_reply_address=GetterSetter(None),
owner_address=GetterSetter(None),
@@ -193,10 +198,13 @@ ATTRIBUTES = dict(
post_id=GetterSetter(None),
posting_address=GetterSetter(None),
real_name=GetterSetter(unicode),
+ reply_goes_to_list=GetterSetter(enum_validator(ReplyToMunging)),
request_address=GetterSetter(None),
scheme=GetterSetter(None),
+ send_welcome_msg=GetterSetter(as_boolean),
volume=GetterSetter(None),
web_host=GetterSetter(None),
+ welcome_msg=GetterSetter(unicode),
)
diff --git a/src/mailman/rest/docs/configuration.txt b/src/mailman/rest/docs/configuration.txt
index dce9c8a95..1260a9e1b 100644
--- a/src/mailman/rest/docs/configuration.txt
+++ b/src/mailman/rest/docs/configuration.txt
@@ -32,11 +32,13 @@ All readable attributes for a list are available on a sub-resource.
collapse_alternatives: True
convert_html_to_plaintext: False
created_at: 20...T...
+ default_member_moderation: False
description:
digest_last_sent_at: None
digest_size_threshold: 30.0
filter_content: False
fqdn_listname: test-one@example.com
+ generic_nonmember_action: 1
host_name: example.com
http_etag: "..."
include_list_post_header: True
@@ -46,6 +48,7 @@ All readable attributes for a list are available on a sub-resource.
leave_address: test-one-leave@example.com
list_id: test-one.example.com
list_name: test-one
+ member_moderation_action: hold
next_digest_number: 1
no_reply_address: noreply@example.com
owner_address: test-one-owner@example.com
@@ -53,10 +56,13 @@ All readable attributes for a list are available on a sub-resource.
post_id: 1
posting_address: test-one@example.com
real_name: Test-one
+ reply_goes_to_list: no_munging
request_address: test-one-request@example.com
scheme: http
+ send_welcome_msg: True
volume: 1
web_host: lists.example.com
+ welcome_msg:
Changing the full configuration
@@ -91,6 +97,12 @@ all the writable attributes in one request.
... filter_content=True,
... convert_html_to_plaintext=True,
... collapse_alternatives=False,
+ ... reply_goes_to_list='point_to_list',
+ ... send_welcome_msg=True,
+ ... welcome_msg='welcome message',
+ ... member_moderation_action='reject',
+ ... default_member_moderation=True,
+ ... generic_nonmember_action=2,
... ),
... 'PUT')
content-length: 0
@@ -119,6 +131,7 @@ These values are changed permanently.
collapse_alternatives: False
convert_html_to_plaintext: True
...
+ default_member_moderation: True
description: This is my mailing list
...
digest_size_threshold: 10.5
@@ -130,7 +143,9 @@ These values are changed permanently.
pipeline: virgin
...
real_name: Fnords
+ reply_goes_to_list: point_to_list
...
+ welcome_msg: welcome message
If you use ``PUT`` to change a list's configuration, all writable attributes
must be included. It is an error to leave one or more out...
@@ -160,6 +175,12 @@ must be included. It is an error to leave one or more out...
... filter_content=True,
... convert_html_to_plaintext=True,
... collapse_alternatives=False,
+ ... reply_goes_to_list='point_to_list',
+ ... send_welcome_msg=True,
+ ... welcome_msg='welcome message',
+ ... member_moderation_action='reject',
+ ... default_member_moderation=True,
+ ... generic_nonmember_action=2,
... ),
... 'PUT')
Traceback (most recent call last):