diff options
Diffstat (limited to 'Mailman/interfaces')
| -rw-r--r-- | Mailman/interfaces/address.py | 3 | ||||
| -rw-r--r-- | Mailman/interfaces/profile.py | 38 | ||||
| -rw-r--r-- | Mailman/interfaces/user.py | 19 |
3 files changed, 38 insertions, 22 deletions
diff --git a/Mailman/interfaces/address.py b/Mailman/interfaces/address.py index 1363d56ab..c367774c3 100644 --- a/Mailman/interfaces/address.py +++ b/Mailman/interfaces/address.py @@ -48,3 +48,6 @@ class IAddress(Interface): role is a Mailman.constants.MemberRole enum. """ + + preferences = Attribute( + """This address's preferences.""") diff --git a/Mailman/interfaces/profile.py b/Mailman/interfaces/profile.py index a0b5131cb..17cfebae6 100644 --- a/Mailman/interfaces/profile.py +++ b/Mailman/interfaces/profile.py @@ -25,29 +25,37 @@ class IPreferences(Interface): """Delivery related information.""" acknowledge_posts = Attribute( - """Boolean specifying whether to send an acknowledgment receipt for - every posting to the mailing list. - """) + """Send an acknowledgment for every posting? - hide_address = Attribute( - """Boolean specifying whether to hide this email address from fellow - list members. - """) + This preference can be True, False, or None. True means the user is + sent a receipt for each message they send to the mailing list. False + means that no receipt is sent. None means no preference is + specified.""") preferred_language = Attribute( - """Preferred language for interacting with a mailing list.""") + """The preferred language for interacting with a mailing list. + + This is either the language code for the preferred language, or None + meaning no preferred language is specified.""") receive_list_copy = Attribute( - """Boolean specifying whether to receive a list copy if the user is - explicitly named in one of the recipient headers. - """) + """Should an explicit recipient receive a list copy? + + When a list member is explicitly named in a message's recipients + (e.g. the To or CC headers), and this preference is True, the + recipient will still receive a list copy of the message. When False, + this list copy will be suppressed. None means no preference is + specified.""") receive_own_postings = Attribute( - """Boolean specifying whether to receive a list copy of the user's own - postings to the mailing list. - """) + """Should the poster get a list copy of their own messages? + + When this preference is True, a list copy will be sent to the poster + of all messages. When False, this list copy will be suppressed. None + means no preference is specified.""") delivery_mode = Attribute( """The preferred delivery mode. - This is an enum constant of the type DeliveryMode.""") + This is an enum constant of the type DeliveryMode. It may also be + None which means that no preference is specified.""") diff --git a/Mailman/interfaces/user.py b/Mailman/interfaces/user.py index 9e89c2416..f7647597d 100644 --- a/Mailman/interfaces/user.py +++ b/Mailman/interfaces/user.py @@ -30,19 +30,21 @@ class IUser(Interface): password = Attribute( """This user's password information.""") - preferences = Attribute( - """The default preferences for this user.""") - addresses = Attribute( """An iterator over all the IAddresses controlled by this user.""") - def register(address): + def register(address, real_name=None): """Register the given email address and link it to this user. In this case, 'address' is a text email address, not an IAddress - object. Raises AddressAlreadyLinkedError if this IAddress is already - linked to another user. If the corresponding IAddress already exists - but is not linked, then it is simply linked to the user. + object. If real_name is not given, the empty string is used. + + Raises AddressAlreadyLinkedError if this IAddress is already linked to + another user. If the corresponding IAddress already exists but is not + linked, then it is simply linked to the user, in which case + real_name is ignored. + + Return the new IAddress object. """ def link(address): @@ -66,3 +68,6 @@ class IUser(Interface): 'address' is a text email address. This method returns true if the user controls the given email address, otherwise false. """ + + preferences = Attribute( + """This user's preferences.""") |
