summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Warsaw2013-08-28 21:00:07 -0400
committerBarry Warsaw2013-08-28 21:00:07 -0400
commit23d3a966b7aa7f1dacf826b61ec094c57c9ac07d (patch)
tree72a5f1a30f8edb019be065e1557561e31291bd89 /src
parente369547cb643cc48f6892a2503148a4b9dbf4a8e (diff)
parent9b3268f2112c592ebb24dd8ef4e0802005b41e4e (diff)
downloadmailman-23d3a966b7aa7f1dacf826b61ec094c57c9ac07d.tar.gz
mailman-23d3a966b7aa7f1dacf826b61ec094c57c9ac07d.tar.zst
mailman-23d3a966b7aa7f1dacf826b61ec094c57c9ac07d.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/docs/NEWS.rst2
-rw-r--r--src/mailman/rest/docs/preferences.rst3
-rw-r--r--src/mailman/rest/preferences.py1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index a2b599cbc..3f85f5b40 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -25,6 +25,8 @@ REST
attributes of a mailing list's configuration. (LP: #1157881)
* Support pagination of some large collections (lists, users, members).
Given by Florian Fuchs. (LP: #1156529)
+ * Expose ``hide_address`` to the ``.../preferences`` REST API. Contributed
+ by Sneha Priscilla.
Configuration
-------------
diff --git a/src/mailman/rest/docs/preferences.rst b/src/mailman/rest/docs/preferences.rst
index e82fd6001..8694364a4 100644
--- a/src/mailman/rest/docs/preferences.rst
+++ b/src/mailman/rest/docs/preferences.rst
@@ -95,6 +95,7 @@ PUT operation.
... 'acknowledge_posts': True,
... 'delivery_mode': 'plaintext_digests',
... 'delivery_status': 'by_user',
+ ... 'hide_address': False,
... 'preferred_language': 'ja',
... 'receive_list_copy': True,
... 'receive_own_postings': False,
@@ -109,6 +110,7 @@ PUT operation.
acknowledge_posts: True
delivery_mode: plaintext_digests
delivery_status: by_user
+ hide_address: False
http_etag: "..."
preferred_language: ja
receive_list_copy: True
@@ -133,6 +135,7 @@ You can also update just a few of the attributes using PATCH.
acknowledge_posts: True
delivery_mode: plaintext_digests
delivery_status: by_user
+ hide_address: False
http_etag: "..."
preferred_language: ja
receive_list_copy: False
diff --git a/src/mailman/rest/preferences.py b/src/mailman/rest/preferences.py
index d392c0299..49db6c632 100644
--- a/src/mailman/rest/preferences.py
+++ b/src/mailman/rest/preferences.py
@@ -84,6 +84,7 @@ class Preferences(ReadOnlyPreferences):
return http.not_found()
kws = dict(
acknowledge_posts=GetterSetter(as_boolean),
+ hide_address = GetterSetter(as_boolean),
delivery_mode=GetterSetter(enum_validator(DeliveryMode)),
delivery_status=GetterSetter(enum_validator(DeliveryStatus)),
preferred_language=GetterSetter(language_validator),