diff options
| author | Barry Warsaw | 2014-04-14 12:14:13 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-14 12:14:13 -0400 |
| commit | 403cbf23c07839b60c85c0bc791b6437f05c8a85 (patch) | |
| tree | b36d0ecab20e01f23bcf66ab2b27633aaf3e99c3 /src/mailman/interfaces | |
| parent | ff6df86000da8fcb055101c5cede36b27cb0480a (diff) | |
| parent | 3a9725b91ef822122a70170333d71b58e1788a78 (diff) | |
| download | mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.tar.gz mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.tar.zst mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.zip | |
Diffstat (limited to 'src/mailman/interfaces')
39 files changed, 105 insertions, 43 deletions
diff --git a/src/mailman/interfaces/action.py b/src/mailman/interfaces/action.py index 22a65d5e1..5d4b150a3 100644 --- a/src/mailman/interfaces/action.py +++ b/src/mailman/interfaces/action.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/address.py b/src/mailman/interfaces/address.py index 450afaae6..28a9e8ef4 100644 --- a/src/mailman/interfaces/address.py +++ b/src/mailman/interfaces/address.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/archiver.py b/src/mailman/interfaces/archiver.py index 5f074503e..8b843bc60 100644 --- a/src/mailman/interfaces/archiver.py +++ b/src/mailman/interfaces/archiver.py @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2008-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -50,6 +50,8 @@ class IArchiver(Interface): """An interface to the archiver.""" name = Attribute('The name of this archiver') + is_enabled = Attribute( + 'A flag indicating whether this archiver is enabled site-wide.') def list_url(mlist): """Return the url to the top of the list's archive. diff --git a/src/mailman/interfaces/autorespond.py b/src/mailman/interfaces/autorespond.py index acad717f1..de0ff3348 100644 --- a/src/mailman/interfaces/autorespond.py +++ b/src/mailman/interfaces/autorespond.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/bans.py b/src/mailman/interfaces/bans.py index 9cb188b79..48b3415c8 100644 --- a/src/mailman/interfaces/bans.py +++ b/src/mailman/interfaces/bans.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2011-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/bounce.py b/src/mailman/interfaces/bounce.py index ff7a47732..0cee88b6a 100644 --- a/src/mailman/interfaces/bounce.py +++ b/src/mailman/interfaces/bounce.py @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2010-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/chain.py b/src/mailman/interfaces/chain.py index 9fffc2760..1b6531d2e 100644 --- a/src/mailman/interfaces/chain.py +++ b/src/mailman/interfaces/chain.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/command.py b/src/mailman/interfaces/command.py index 18a8024a8..2a0656841 100644 --- a/src/mailman/interfaces/command.py +++ b/src/mailman/interfaces/command.py @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2008-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/configuration.py b/src/mailman/interfaces/configuration.py index c9a438e2d..65547d44d 100644 --- a/src/mailman/interfaces/configuration.py +++ b/src/mailman/interfaces/configuration.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2012-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/database.py b/src/mailman/interfaces/database.py index 96465d4f2..21f2f71d0 100644 --- a/src/mailman/interfaces/database.py +++ b/src/mailman/interfaces/database.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/digests.py b/src/mailman/interfaces/digests.py index 416e18f13..3abb5e57b 100644 --- a/src/mailman/interfaces/digests.py +++ b/src/mailman/interfaces/digests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/domain.py b/src/mailman/interfaces/domain.py index f0f1099c5..d8f8ec100 100644 --- a/src/mailman/interfaces/domain.py +++ b/src/mailman/interfaces/domain.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/errors.py b/src/mailman/interfaces/errors.py index 654b1ae17..0d3eef7e8 100644 --- a/src/mailman/interfaces/errors.py +++ b/src/mailman/interfaces/errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2013 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/handler.py b/src/mailman/interfaces/handler.py index fbd882603..2e6c3fa20 100644 --- a/src/mailman/interfaces/handler.py +++ b/src/mailman/interfaces/handler.py @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2008-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/languages.py b/src/mailman/interfaces/languages.py index 6b8f52fc5..32c18fb7a 100644 --- a/src/mailman/interfaces/languages.py +++ b/src/mailman/interfaces/languages.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/listmanager.py b/src/mailman/interfaces/listmanager.py index 45b12af53..068fe82dc 100644 --- a/src/mailman/interfaces/listmanager.py +++ b/src/mailman/interfaces/listmanager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -97,9 +97,9 @@ class IListManager(Interface): def create(fqdn_listname): """Create a mailing list with the given name. - :type fqdn_listname: Unicode :param fqdn_listname: The fully qualified name of the mailing list, e.g. `mylist@example.com`. + :type fqdn_listname: Unicode :return: The newly created `IMailingList`. :raise `ListAlreadyExistsError` if the named list already exists. """ @@ -107,8 +107,8 @@ class IListManager(Interface): def get(fqdn_listname): """Return the mailing list with the given name, if it exists. - :type fqdn_listname: Unicode. :param fqdn_listname: The fully qualified name of the mailing list. + :type fqdn_listname: Unicode. :return: the matching `IMailingList` or None if the named list does not exist. """ @@ -116,8 +116,8 @@ class IListManager(Interface): def get_by_list_id(list_id): """Return the mailing list with the given list id, if it exists. - :type fqdn_listname: Unicode. :param fqdn_listname: The fully qualified name of the mailing list. + :type fqdn_listname: Unicode. :return: the matching `IMailingList` or None if the named list does not exist. """ @@ -125,8 +125,8 @@ class IListManager(Interface): def delete(mlist): """Remove the mailing list from the database. - :type mlist: `IMailingList` :param mlist: The mailing list to delete. + :type mlist: `IMailingList` """ mailing_lists = Attribute( diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py index 0615ad239..3900e3349 100644 --- a/src/mailman/interfaces/mailinglist.py +++ b/src/mailman/interfaces/mailinglist.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -23,6 +23,8 @@ __metaclass__ = type __all__ = [ 'IAcceptableAlias', 'IAcceptableAliasSet', + 'IListArchiver', + 'IListArchiverSet', 'IMailingList', 'Personalization', 'ReplyToMunging', @@ -791,3 +793,37 @@ class IAcceptableAliasSet(Interface): aliases = Attribute( """An iterator over all the acceptable aliases.""") + + + +class IListArchiver(Interface): + """An archiver for a mailing list. + + The named archiver must be enabled site-wide in order for a mailing list + to be able to enable it. + """ + + mailing_list = Attribute('The associated mailing list.') + + name = Attribute('The name of the archiver.') + + is_enabled = Attribute('Is this archiver enabled for this mailing list?') + + system_archiver = Attribute( + 'The associated system-wide IArchiver instance.') + + +class IListArchiverSet(Interface): + """The set of archivers (enabled or disabled) for a mailing list.""" + + archivers = Attribute( + """An iterator over all the archivers for this mailing list.""") + + def get(archiver_name): + """Return the `IListArchiver` with the given name, if it exists. + + :param archiver_name: The name of the archiver. + :type archiver_name: unicode. + :return: the matching `IListArchiver` or None if the named archiver + does not exist. + """ diff --git a/src/mailman/interfaces/member.py b/src/mailman/interfaces/member.py index b561a7571..f5fe9438e 100644 --- a/src/mailman/interfaces/member.py +++ b/src/mailman/interfaces/member.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/messages.py b/src/mailman/interfaces/messages.py index f29fac317..6b9db67d2 100644 --- a/src/mailman/interfaces/messages.py +++ b/src/mailman/interfaces/messages.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/mime.py b/src/mailman/interfaces/mime.py index 549e6c3db..502fbca4e 100644 --- a/src/mailman/interfaces/mime.py +++ b/src/mailman/interfaces/mime.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/mlistrequest.py b/src/mailman/interfaces/mlistrequest.py index b130303c6..dc6a9463e 100644 --- a/src/mailman/interfaces/mlistrequest.py +++ b/src/mailman/interfaces/mlistrequest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/mta.py b/src/mailman/interfaces/mta.py index c67e4f822..ccbef04cb 100644 --- a/src/mailman/interfaces/mta.py +++ b/src/mailman/interfaces/mta.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/nntp.py b/src/mailman/interfaces/nntp.py index 03be8f11d..8e73c2c50 100644 --- a/src/mailman/interfaces/nntp.py +++ b/src/mailman/interfaces/nntp.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/pending.py b/src/mailman/interfaces/pending.py index f0cb07d65..77045aafe 100644 --- a/src/mailman/interfaces/pending.py +++ b/src/mailman/interfaces/pending.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/permissions.py b/src/mailman/interfaces/permissions.py index cf2e563ab..8e403e89c 100644 --- a/src/mailman/interfaces/permissions.py +++ b/src/mailman/interfaces/permissions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/pipeline.py b/src/mailman/interfaces/pipeline.py index 5a2d56aec..b7c933cac 100644 --- a/src/mailman/interfaces/pipeline.py +++ b/src/mailman/interfaces/pipeline.py @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2008-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/preferences.py b/src/mailman/interfaces/preferences.py index cf6a1b459..4d9ef683f 100644 --- a/src/mailman/interfaces/preferences.py +++ b/src/mailman/interfaces/preferences.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/registrar.py b/src/mailman/interfaces/registrar.py index 51150dbf2..8a77ca8f6 100644 --- a/src/mailman/interfaces/registrar.py +++ b/src/mailman/interfaces/registrar.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -26,6 +26,7 @@ from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ + 'ConfirmationNeededEvent', 'IRegistrar', ] @@ -34,6 +35,29 @@ from zope.interface import Interface +class ConfirmationNeededEvent: + """Triggered when an address needs confirmation. + + Addresses must be verified before they can receive messages or post to + mailing list. When an address is registered with Mailman, via the + `IRegistrar` interface, an `IPendable` is created which represents the + pending registration. This pending registration is stored in the + database, keyed by a token. Then this event is triggered. + + There may be several ways to confirm an email address. On some sites, + registration may immediately produce a verification, e.g. because it is on + a known intranet. Or verification may occur via external database lookup + (e.g. LDAP). On most public mailing lists, a mail-back confirmation is + sent to the address, and only if they reply to the mail-back, or click on + an embedded link, is the registered address confirmed. + """ + def __init__(self, mlist, pendable, token): + self.mlist = mlist + self.pendable = pendable + self.token = token + + + class IRegistrar(Interface): """Interface for registering and verifying email addresses and users. diff --git a/src/mailman/interfaces/requests.py b/src/mailman/interfaces/requests.py index 35de05100..2df1b20fd 100644 --- a/src/mailman/interfaces/requests.py +++ b/src/mailman/interfaces/requests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/roster.py b/src/mailman/interfaces/roster.py index 9b293829c..6a3e5c579 100644 --- a/src/mailman/interfaces/roster.py +++ b/src/mailman/interfaces/roster.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/rules.py b/src/mailman/interfaces/rules.py index a9d6145a2..7de70dee3 100644 --- a/src/mailman/interfaces/rules.py +++ b/src/mailman/interfaces/rules.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/runner.py b/src/mailman/interfaces/runner.py index a8b76652c..8ad9000ce 100644 --- a/src/mailman/interfaces/runner.py +++ b/src/mailman/interfaces/runner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/styles.py b/src/mailman/interfaces/styles.py index c75c81f75..f4c185cd2 100644 --- a/src/mailman/interfaces/styles.py +++ b/src/mailman/interfaces/styles.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/subscriptions.py b/src/mailman/interfaces/subscriptions.py index ea49331b5..456ae7be1 100644 --- a/src/mailman/interfaces/subscriptions.py +++ b/src/mailman/interfaces/subscriptions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/switchboard.py b/src/mailman/interfaces/switchboard.py index b3adcfe50..36f0644be 100644 --- a/src/mailman/interfaces/switchboard.py +++ b/src/mailman/interfaces/switchboard.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/system.py b/src/mailman/interfaces/system.py index 17ef9193a..999878aa0 100644 --- a/src/mailman/interfaces/system.py +++ b/src/mailman/interfaces/system.py @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2009-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/templates.py b/src/mailman/interfaces/templates.py index aec4e8d24..de5fa11a9 100644 --- a/src/mailman/interfaces/templates.py +++ b/src/mailman/interfaces/templates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2012-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/user.py b/src/mailman/interfaces/user.py index 10d91a2e9..e1c1df243 100644 --- a/src/mailman/interfaces/user.py +++ b/src/mailman/interfaces/user.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/src/mailman/interfaces/usermanager.py b/src/mailman/interfaces/usermanager.py index 2994a1afc..b06043c78 100644 --- a/src/mailman/interfaces/usermanager.py +++ b/src/mailman/interfaces/usermanager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # |
