diff options
| author | Barry Warsaw | 2007-08-05 22:49:04 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2007-08-05 22:49:04 -0500 |
| commit | 89bdaec5c735ffb2b27cc29620cb01b451b72550 (patch) | |
| tree | 61c6fa40eb1d3e267475430005b50ecf44b46512 /Mailman/interfaces | |
| parent | e0abca9fbdde530f7517396677c87f19c86bc0c6 (diff) | |
| download | mailman-89bdaec5c735ffb2b27cc29620cb01b451b72550.tar.gz mailman-89bdaec5c735ffb2b27cc29620cb01b451b72550.tar.zst mailman-89bdaec5c735ffb2b27cc29620cb01b451b72550.zip | |
Fixed a problem where members of a deleted mailing list were hanging around.
This would cause duplicate members (e.g. owners) if you created, deleted and
then recreated the mailing list.
Mailman.app.create -> Mailman.app.lifecycle; Mailman/doc/create.txt ->
Mailman/doc/lifecycle.txt; also added a remove_list() function.
Added SubscriptionError base class, made HostileSubscriptionError inherit from
that, and added a new AlreadySubscribedError.
Rewrote bin/rmlist to use the new lifecycle.remove_list() function.
IAddress.subscribe() must now throw an AlreadySubscribedError if the address
is already subscribed to the mailing list with the given role.
Added a Subscribers roster, attached to the IMailingList which gives access to
all subscribers of a mailing list, regardless of their role. Added a new test
for this roster.
Diffstat (limited to 'Mailman/interfaces')
| -rw-r--r-- | Mailman/interfaces/address.py | 8 | ||||
| -rw-r--r-- | Mailman/interfaces/mlistrosters.py | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Mailman/interfaces/address.py b/Mailman/interfaces/address.py index 6b00d7915..1e654a2fc 100644 --- a/Mailman/interfaces/address.py +++ b/Mailman/interfaces/address.py @@ -56,10 +56,14 @@ class IAddress(Interface): None if the email address has not yet been validated. The specific method of validation is not defined here.""") - def subscribe(mlist, role): + def subscribe(mailing_list, role): """Subscribe the address to the given mailing list with the given role. - role is a Mailman.constants.MemberRole enum. + :param mailing_list: The IMailingList being subscribed to. + :param role: A MemberRole enum value. + :return: The IMember representing this subscription. + :raises AlreadySubscribedError: If the address is already subscribed + to the mailing list with the given role. """ preferences = Attribute( diff --git a/Mailman/interfaces/mlistrosters.py b/Mailman/interfaces/mlistrosters.py index 9cd20e3ef..86cd4ec91 100644 --- a/Mailman/interfaces/mlistrosters.py +++ b/Mailman/interfaces/mlistrosters.py @@ -61,3 +61,8 @@ class IMailingListRosters(Interface): postings to this mailing list, regardless of whether they have their deliver disabled or not, or of the type of digest they are to receive.""") + + subscribers = Attribute( + """An iterator over all IMembers subscribed to this list, with any + role. + """) |
