summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/mailinglist.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-04-16 12:55:48 -0400
committerBarry Warsaw2011-04-16 12:55:48 -0400
commit3db11b8bcb7194b5672426ad057f965734134a59 (patch)
treef92386d56455d1325633eefce652b111598cda13 /src/mailman/interfaces/mailinglist.py
parentc894152772595a1acbd6dc4c1ac0e033888ea923 (diff)
downloadmailman-3db11b8bcb7194b5672426ad057f965734134a59.tar.gz
mailman-3db11b8bcb7194b5672426ad057f965734134a59.tar.zst
mailman-3db11b8bcb7194b5672426ad057f965734134a59.zip
Diffstat (limited to 'src/mailman/interfaces/mailinglist.py')
-rw-r--r--src/mailman/interfaces/mailinglist.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py
index d8c0ebb26..32f21a792 100644
--- a/src/mailman/interfaces/mailinglist.py
+++ b/src/mailman/interfaces/mailinglist.py
@@ -182,7 +182,7 @@ class IMailingList(Interface):
def confirm_address(cookie=''):
"""The address used for various forms of email confirmation."""
- # Rosters.
+ # Rosters and subscriptions.
owners = Attribute(
"""The IUser owners of this mailing list.
@@ -232,6 +232,20 @@ class IMailingList(Interface):
:rtype: Roster
"""
+ def subscribe(address, role):
+ """Subscribe the given address to the mailing list.
+
+ :param address: The address to subscribe.
+ :type address: `IAddress`
+ :param role: The role being subscribed to (e.g. a member, owner, or
+ moderator of a mailing list.
+ :type role: `MemberRole`
+ :return: The member object representing the subscription.
+ :rtype: `IMember`
+ :raises AlreadySubscribedError: If the address is already subscribed
+ to the mailing list with the given role.
+ """
+
# Posting history.
last_post_at = Attribute(