diff options
| author | Barry Warsaw | 2007-06-09 15:20:32 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-06-09 15:20:32 -0400 |
| commit | 3231fd628f6eea30bd6e2be56eb419ed0008d954 (patch) | |
| tree | 176f80a7b4f72c410e30ab9ba3e3fe2deb1bb1fe /Mailman/interfaces/member.py | |
| parent | e5c04e2a93a58d799dd3940a7935853eb1f2e3e4 (diff) | |
| download | mailman-3231fd628f6eea30bd6e2be56eb419ed0008d954.tar.gz mailman-3231fd628f6eea30bd6e2be56eb419ed0008d954.tar.zst mailman-3231fd628f6eea30bd6e2be56eb419ed0008d954.zip | |
Implement the new, simplified membership model. Rosters and RosterSets as
they were previously known are now gone. Rosters, rather than being a
database entity that collects users, is now just a filter on the member
database. This way, we can use generic rosters to search for regular members,
digest members, owners, or moderators. More advanced rosters can do all kinds
of other membership queries. But rosters no longer need to be a database
entity.
Users have a name, password, optional preferences, and a set of addresses, but
users are not subscribed to mailing lists.
Addresses have the email address, some verification information, and optional
preferences.
Members tie an address to a mailing list, through a role, with optional
preferences.
Other changes here include:
MailList.fqdn_listname() moved to the MailingList model entity.
Added MemberRole enum and SystemDefaultPreferences to Mailman.constants.
Profiles are renamed to Preferences (same with the interface), but the files
are not yet moved. This happens later.
We mostly don't need has_*() relationships on the entity classes, because we
generally don't need the reverse relationship. Use belongs_to() because that
creates the foreign key, even though the wording seems counter intuitive.
IAddress.subscribe() added.
Tell Elixir to use shortnames for all tables.
Remove the OldStyleMembership fields from MailingList.
Remove all the interface elements and database fields that talk about rosters
and rostersets.
Convert Version entity to has_field().
Diffstat (limited to 'Mailman/interfaces/member.py')
| -rw-r--r-- | Mailman/interfaces/member.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Mailman/interfaces/member.py b/Mailman/interfaces/member.py new file mode 100644 index 000000000..5d5e3f717 --- /dev/null +++ b/Mailman/interfaces/member.py @@ -0,0 +1,48 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + + +"""Interface describing the basics of a member.""" + +from zope.interface import Interface, Attribute + + + +class IMember(Interface): + """A member of a mailing list.""" + + mailing_list = Attribute( + """The mailing list subscribed to.""") + + address = Attribute( + """The email address that's subscribed to the list.""") + + preferences = Attribute( + """The set of preferences for this subscription. + + This will return an IPreferences object using the following lookup + rules: + + 1. member + 2. address + 3. user + 4. mailing list + 5. system default + """) + + role = Attribute( + """The role of this membership.""") |
