diff options
| author | Barry Warsaw | 2011-04-04 14:32:17 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-04-04 14:32:17 -0400 |
| commit | 17887e4d1e56915647e1d395e18573db2b9ea3ba (patch) | |
| tree | 8dc9f275e878539040ee25857593570aca1ec113 /src/mailman/rest/root.py | |
| parent | cd18f50624f33a9556492168933d5fe088d51a04 (diff) | |
| download | mailman-17887e4d1e56915647e1d395e18573db2b9ea3ba.tar.gz mailman-17887e4d1e56915647e1d395e18573db2b9ea3ba.tar.zst mailman-17887e4d1e56915647e1d395e18573db2b9ea3ba.zip | |
More fleshing out of the users REST API.
* Add a 'uid factory' which allows us to return predictable unique ids for
various testing purposes, e.g. user ids. This should work even in the case
of cross-subprocess uid generation.
* REST access to individual users, or the set of all users.
* User objects now have a created_on attribute.
* Users can be created through the web, but must have an email address.
* Add a [devmode] 'testing' variable for communicating to qrunner subprocesses
that we're running in testing mode. This allows us to coordinate factories
and such in the qrunner processes.
* layers.is_testing() for more consistent API.
* Give AddressError a .address attribute for better diagnostics.
Diffstat (limited to '')
| -rw-r--r-- | src/mailman/rest/root.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py index 35bd8e12d..3287a6be2 100644 --- a/src/mailman/rest/root.py +++ b/src/mailman/rest/root.py @@ -34,7 +34,7 @@ from mailman.rest.domains import ADomain, AllDomains from mailman.rest.helpers import etag, path_to from mailman.rest.lists import AList, AllLists from mailman.rest.members import AllMembers -from mailman.rest.users import AllUsers +from mailman.rest.users import AUser, AllUsers @@ -115,4 +115,6 @@ class TopLevel(resource.Resource): """/<api>/users""" if len(segments) == 0: return AllUsers() - return http.bad_request() + else: + user_id = segments.pop(0) + return AUser(user_id), segments |
