diff options
| author | Barry Warsaw | 2007-06-09 18:16:29 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-06-09 18:16:29 -0400 |
| commit | 5bc4941f0b749830d5e4feb57be5f172e77e0631 (patch) | |
| tree | ac56f0b3ed7398673d97bcf737c8ea9143704ef6 /Mailman/interfaces | |
| parent | 3231fd628f6eea30bd6e2be56eb419ed0008d954 (diff) | |
| download | mailman-5bc4941f0b749830d5e4feb57be5f172e77e0631.tar.gz mailman-5bc4941f0b749830d5e4feb57be5f172e77e0631.tar.zst mailman-5bc4941f0b749830d5e4feb57be5f172e77e0631.zip | |
Repair the usermanager.txt and listmanager.txt doc tests. These repairs were
necessary to deal with the simplified user model. Eradicate more references
to rosters and roster sets.
Give Users a repr. Also give them a belongs_to() link to Preferences, but
change the user manager to not give a user preferences by default (the lookup
schema should properly handle users with no preferences now).
Also, when creating a user, set their real_name to the empty string if no
real_name argument was given to create_user(). Update the IUserManager
interface's create_user() method to match the implementation.
Diffstat (limited to 'Mailman/interfaces')
| -rw-r--r-- | Mailman/interfaces/usermanager.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Mailman/interfaces/usermanager.py b/Mailman/interfaces/usermanager.py index 38dd06dfa..d239ea5b3 100644 --- a/Mailman/interfaces/usermanager.py +++ b/Mailman/interfaces/usermanager.py @@ -33,8 +33,16 @@ class IUserManager(Interface): IUsers in all IRosters. """ - def create_user(): - """Create and return an IUser.""" + def create_user(address=None, real_name=None): + """Create and return an IUser. + + When address is given, an IAddress is also created and linked to the + new IUser object. It is an error if the address already exists. + + When real_name is given, the IUser's real_name is set to this string. + If an IAddress is also created and linked, its real_name is set to the + same string. + """ def delete_user(user): """Delete the given IUser.""" |
