summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2012-08-20 20:55:24 -0400
committerBarry Warsaw2012-08-20 20:55:24 -0400
commit56c3bf127b5fb912461e638b6936c627d30be744 (patch)
treed75446752e71bcf8d4fec1cf7739d45d0136f3a7
parent813cee543b4008967ba78be3e059b7d21d2fe1bf (diff)
downloadmailman-56c3bf127b5fb912461e638b6936c627d30be744.tar.gz
mailman-56c3bf127b5fb912461e638b6936c627d30be744.tar.zst
mailman-56c3bf127b5fb912461e638b6936c627d30be744.zip
-rw-r--r--src/mailman/docs/ACKNOWLEDGMENTS.rst1
-rw-r--r--src/mailman/docs/NEWS.rst5
-rw-r--r--src/mailman/rest/configuration.py2
-rw-r--r--src/mailman/rest/docs/configuration.rst6
4 files changed, 14 insertions, 0 deletions
diff --git a/src/mailman/docs/ACKNOWLEDGMENTS.rst b/src/mailman/docs/ACKNOWLEDGMENTS.rst
index 740dfcb27..10d4bcd93 100644
--- a/src/mailman/docs/ACKNOWLEDGMENTS.rst
+++ b/src/mailman/docs/ACKNOWLEDGMENTS.rst
@@ -248,6 +248,7 @@ left off the list!
* Greg Stein
* Dale Stimson
* Students of HIT <mailman-cn@mail.cs.hit.edu.cn>
+* Alexander Sulfrian
* Szabolcs Szigeti
* Vizi Szilard
* David T-G
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index db95e7cdf..f273b099f 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -70,6 +70,11 @@ Database
column to the mailinglist table. Since this is unused in Mailman, it was
simply commented out of the base schema for PostgreSQL.
+REST
+----
+ * Expose `archive_policy` in the REST API. Contributed by Alexander
+ Sulfrian. (LP: #1039129)
+
Configuration
-------------
* New configuration variables `clobber_date` and `clobber_skew` supported in
diff --git a/src/mailman/rest/configuration.py b/src/mailman/rest/configuration.py
index 9c32d4b48..83d4c74f6 100644
--- a/src/mailman/rest/configuration.py
+++ b/src/mailman/rest/configuration.py
@@ -30,6 +30,7 @@ from restish import http, resource
from mailman.config import config
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.rest.helpers import PATCH, etag, no_content
@@ -170,6 +171,7 @@ ATTRIBUTES = dict(
autoresponse_owner_text=GetterSetter(unicode),
autoresponse_postings_text=GetterSetter(unicode),
autoresponse_request_text=GetterSetter(unicode),
+ archive_policy=GetterSetter(enum_validator(ArchivePolicy)),
bounces_address=GetterSetter(None),
collapse_alternatives=GetterSetter(as_boolean),
convert_html_to_plaintext=GetterSetter(as_boolean),
diff --git a/src/mailman/rest/docs/configuration.rst b/src/mailman/rest/docs/configuration.rst
index 43ddc0f60..4507345c3 100644
--- a/src/mailman/rest/docs/configuration.rst
+++ b/src/mailman/rest/docs/configuration.rst
@@ -22,6 +22,7 @@ All readable attributes for a list are available on a sub-resource.
advertised: True
allow_list_posts: True
anonymous_list: False
+ archive_policy: public
autorespond_owner: none
autorespond_postings: none
autorespond_requests: none
@@ -80,6 +81,7 @@ all the writable attributes in one request.
... administrivia=False,
... advertised=False,
... anonymous_list=True,
+ ... archive_policy='never',
... autorespond_owner='respond_and_discard',
... autorespond_postings='respond_and_continue',
... autorespond_requests='respond_and_discard',
@@ -119,6 +121,7 @@ These values are changed permanently.
advertised: False
allow_list_posts: False
anonymous_list: True
+ archive_policy: never
autorespond_owner: respond_and_discard
autorespond_postings: respond_and_continue
autorespond_requests: respond_and_discard
@@ -159,6 +162,7 @@ must be included. It is an error to leave one or more out...
... administrivia=False,
... advertised=False,
... anonymous_list=True,
+ ... archive_policy='public',
... autorespond_owner='respond_and_discard',
... autorespond_postings='respond_and_continue',
... autorespond_requests='respond_and_discard',
@@ -198,6 +202,7 @@ must be included. It is an error to leave one or more out...
... administrivia=False,
... advertised=False,
... anonymous_list=True,
+ ... archive_policy='public',
... autorespond_owner='respond_and_discard',
... autorespond_postings='respond_and_continue',
... autorespond_requests='respond_and_discard',
@@ -263,6 +268,7 @@ It is also an error to spell an attribute value incorrectly...
... admin_notify_mchanges=True,
... advertised=False,
... anonymous_list=True,
+ ... archive_policy='public',
... autorespond_owner='respond_and_discard',
... autorespond_postings='respond_and_continue',
... autorespond_requests='respond_and_discard',