summaryrefslogtreecommitdiff
path: root/src/mailman/rest/root.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-04-25 22:23:05 -0400
committerBarry Warsaw2011-04-25 22:23:05 -0400
commit3f705f533191e4dd50a615c5692b00905b178e0a (patch)
tree2d38df244ab4e809bbbcb715684731f3e71a0e55 /src/mailman/rest/root.py
parent3fb495013e82e75ed3ba0fd9675eec1bfdd3df66 (diff)
downloadmailman-3f705f533191e4dd50a615c5692b00905b178e0a.tar.gz
mailman-3f705f533191e4dd50a615c5692b00905b178e0a.tar.zst
mailman-3f705f533191e4dd50a615c5692b00905b178e0a.zip
Complete the ability to change a subscription address, both internally and via
the REST API. (LP: #643949) * New resource path in REST API: /addresses/<email>/memberships gets all the memberships for a given email address. * In the REST API, PUTting or PATCHing a list configuration now returns a 204 (No Content) success code instead of a 200 success code with an empty body. * When a user is subscribed with their preferred address, changing the preferred address also changes all subscriptions. * When a user is subscribed with a specific address, their subscription can be changed to any verified address they control. * Use a new naming scheme for doctests with multiple mailing lists.
Diffstat (limited to 'src/mailman/rest/root.py')
-rw-r--r--src/mailman/rest/root.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py
index 0c48ad6b9..caa44f872 100644
--- a/src/mailman/rest/root.py
+++ b/src/mailman/rest/root.py
@@ -87,10 +87,9 @@ class TopLevel(resource.Resource):
"""
if len(segments) == 0:
return AllAddresses()
- elif len(segments) == 1:
- return AnAddress(segments[0]), []
else:
- return http.bad_request()
+ email = segments.pop(0)
+ return AnAddress(email), segments
@resource.child()
def domains(self, request, segments):