summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/user.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-05-14 11:59:40 -0400
committerBarry Warsaw2016-05-14 11:59:40 -0400
commitc6ae077a5578a4e93e972f1cb037b2a99f4fe1b4 (patch)
tree30a945302b1e19a0046a74a8886aa4ea2740e4b5 /src/mailman/interfaces/user.py
parent3ed71ffdbc4e0cbb4fc33e0de04eaeea6faae149 (diff)
downloadmailman-c6ae077a5578a4e93e972f1cb037b2a99f4fe1b4.tar.gz
mailman-c6ae077a5578a4e93e972f1cb037b2a99f4fe1b4.tar.zst
mailman-c6ae077a5578a4e93e972f1cb037b2a99f4fe1b4.zip
Diffstat (limited to 'src/mailman/interfaces/user.py')
-rw-r--r--src/mailman/interfaces/user.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mailman/interfaces/user.py b/src/mailman/interfaces/user.py
index 27a8cbaba..a6c470b6e 100644
--- a/src/mailman/interfaces/user.py
+++ b/src/mailman/interfaces/user.py
@@ -111,7 +111,22 @@ class IUser(Interface):
"""This user's preferences.""")
def absorb(user):
- """Merge this user's attributes and memberships, and then delete it.
+ """Merge the given user to ourself.
- In case of conflict, the current user's properties are preserved.
+ All IAddresses linked to `user` are relinked to ourself. A
+ memberships associated with `user` are changed to be memberships
+ with ourself. See `IPreferences.absorb()`.
+
+ The user's `display_name`, `password`, and `is_server_owner` settings
+ are absorbed into ours, but only if ours is unset and the given user's
+ values are set.
+
+ After being absorbed, the given user and its preferences are
+ deleted.
+
+ It is not an error if `user` is ourself, but it is a no-op.
+
+ :param user: The user to merge into ourself.
+ :type user: IUser
+ :raises TypeError: if `user` is not a user.
"""