summaryrefslogtreecommitdiff
path: root/src/mailman/rest/root.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-04-12 18:09:36 -0400
committerBarry Warsaw2011-04-12 18:09:36 -0400
commit5bb93de8db9b251a53968f0e1cf0b22d472e1a57 (patch)
treeaac85174fe3cea5e09113b9c9293fc484c773a66 /src/mailman/rest/root.py
parent980e9dff9811466dcb9b44539d694b6eac32a17b (diff)
parent7c6633d17617ac60f11ff7de44160a9d804d4777 (diff)
downloadmailman-5bb93de8db9b251a53968f0e1cf0b22d472e1a57.tar.gz
mailman-5bb93de8db9b251a53968f0e1cf0b22d472e1a57.tar.zst
mailman-5bb93de8db9b251a53968f0e1cf0b22d472e1a57.zip
Lots of work to update the model for users, passwords, membership, testing,
and the REST API. A highlight of the merged changes: * The REST API now has a /users top-level URL under which user information can be accessed, and new users can be created. * IUsers now have a unique `user_id` which is evident in the REST API. Under testing, these uids are predictable, but otherwise, they're entirely random but guaranteed to be unique. * IUsers now have a `created_on` attribute. Like `user_id` these are predictable under testing, but otherwise reflect the actual date. * User passwords are now 'encrypted' (hashed) as defined by the config file. - new mailman.cfg variables password_scheme and password_length * IMember gets a `user` attribute which is a convenience for getting the IUser associated with the member. * mmsitepass is gone: - creator_pw_file - site_pw_file * Improved test initialization and its hook into zc.buildout.
Diffstat (limited to 'src/mailman/rest/root.py')
-rw-r--r--src/mailman/rest/root.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py
index 9d8c92428..3287a6be2 100644
--- a/src/mailman/rest/root.py
+++ b/src/mailman/rest/root.py
@@ -34,6 +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 AUser, AllUsers
@@ -108,3 +109,12 @@ class TopLevel(resource.Resource):
if len(segments) == 0:
return AllMembers()
return http.bad_request()
+
+ @resource.child()
+ def users(self, request, segments):
+ """/<api>/users"""
+ if len(segments) == 0:
+ return AllUsers()
+ else:
+ user_id = segments.pop(0)
+ return AUser(user_id), segments