diff options
| author | Barry Warsaw | 2011-04-08 22:22:19 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-04-08 22:22:19 -0400 |
| commit | 9bf23a2f5bc3c7a4f766f3c18f6cf8e42854185c (patch) | |
| tree | 1657f5673a8782ce4faa3865266a4672282df4b9 /src/mailman/rest/users.py | |
| parent | 2102f99312d81e1869060f6c7dff286663540c3b (diff) | |
| download | mailman-9bf23a2f5bc3c7a4f766f3c18f6cf8e42854185c.tar.gz mailman-9bf23a2f5bc3c7a4f766f3c18f6cf8e42854185c.tar.zst mailman-9bf23a2f5bc3c7a4f766f3c18f6cf8e42854185c.zip | |
Diffstat (limited to 'src/mailman/rest/users.py')
| -rw-r--r-- | src/mailman/rest/users.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py index 9a00cecd2..7413a8e19 100644 --- a/src/mailman/rest/users.py +++ b/src/mailman/rest/users.py @@ -33,6 +33,8 @@ from mailman.interfaces.address import ExistingAddressError from mailman.interfaces.usermanager import IUserManager from mailman.rest.helpers import CollectionMixin, etag, path_to from mailman.rest.validator import Validator +from mailman.utilities.passwords import ( + encrypt_password, make_user_friendly_password) @@ -86,7 +88,10 @@ class AllUsers(_UserBase): except ExistingAddressError as error: return http.bad_request([], b'Address already exists {0}'.format( error.email)) - # XXX ignore password for now. + if password is None: + # This will have to be reset since it cannot be retrieved. + password = make_user_friendly_password() + user.password = encrypt_password(password) location = path_to('users/{0}'.format(user.user_id)) return http.created(location, [], None) |
