diff options
| author | Barry Warsaw | 2011-04-08 22:02:49 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-04-08 22:02:49 -0400 |
| commit | 25b407e24fe21dc46a4f9efa77734d55e0ed4bdd (patch) | |
| tree | d129f8727bac75263c08d84b5138bef8f693ffef /src/mailman/model | |
| parent | c73acb993acfc08f542b886eb426d6156a6a0a13 (diff) | |
| download | mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.tar.gz mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.tar.zst mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.zip | |
encrypt_password(): New convenience function for ensuring that a password is
both encrypted according to a scheme, and a bytes object.
add_member(): Use encrypt_password().
cli_members: Give the user a default, user-friendly password. Of course, this
will be encrypted so it can't be retrieved, but it can be reset.
Passwords are stored as bytes objects, not unicode now.
ConfigLayer: Set the default test password scheme to cleartext.
General test repair.
Diffstat (limited to 'src/mailman/model')
| -rw-r--r-- | src/mailman/model/docs/requests.txt | 15 | ||||
| -rw-r--r-- | src/mailman/model/docs/usermanager.txt | 2 | ||||
| -rw-r--r-- | src/mailman/model/docs/users.txt | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/mailman/model/docs/requests.txt b/src/mailman/model/docs/requests.txt index 94c81e1dc..2ff173422 100644 --- a/src/mailman/model/docs/requests.txt +++ b/src/mailman/model/docs/requests.txt @@ -692,15 +692,9 @@ Frank Person is now a member of the mailing list. <Language [en] English (USA)> >>> print member.delivery_mode DeliveryMode.regular - - >>> from mailman.interfaces.usermanager import IUserManager - >>> from zope.component import getUtility - >>> user_manager = getUtility(IUserManager) - - >>> user = user_manager.get_user(member.address.email) - >>> print user.real_name + >>> print member.user.real_name Frank Person - >>> print user.password + >>> print member.user.password {NONE}abcxyz @@ -713,6 +707,11 @@ unsubscription holds can send the list's moderators an immediate notification. :: + + >>> from mailman.interfaces.usermanager import IUserManager + >>> from zope.component import getUtility + >>> user_manager = getUtility(IUserManager) + >>> mlist.admin_immed_notify = False >>> from mailman.interfaces.member import MemberRole >>> user_1 = user_manager.create_user('gperson@example.com') diff --git a/src/mailman/model/docs/usermanager.txt b/src/mailman/model/docs/usermanager.txt index 8304e659c..e427eb63a 100644 --- a/src/mailman/model/docs/usermanager.txt +++ b/src/mailman/model/docs/usermanager.txt @@ -44,7 +44,7 @@ A user can be assigned a real name. A user can be assigned a password. - >>> user.password = 'secret' + >>> user.password = b'secret' >>> dump_list(user.password for user in user_manager.users) secret diff --git a/src/mailman/model/docs/users.txt b/src/mailman/model/docs/users.txt index 31cc58918..c8244c506 100644 --- a/src/mailman/model/docs/users.txt +++ b/src/mailman/model/docs/users.txt @@ -19,7 +19,7 @@ User data Users may have a real name and a password. >>> user_1 = user_manager.create_user() - >>> user_1.password = 'my password' + >>> user_1.password = b'my password' >>> user_1.real_name = 'Zoe Person' >>> dump_list(user.real_name for user in user_manager.users) Zoe Person @@ -29,7 +29,7 @@ Users may have a real name and a password. The password and real name can be changed at any time. >>> user_1.real_name = 'Zoe X. Person' - >>> user_1.password = 'another password' + >>> user_1.password = b'another password' >>> dump_list(user.real_name for user in user_manager.users) Zoe X. Person >>> dump_list(user.password for user in user_manager.users) |
