~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/model/docs/membership.rst

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
List memberships
3
3
================
4
4
 
5
 
Users represent people in Mailman.  Users control email addresses, and rosters
6
 
are collections of members.  A member gives an email address a role, such as
7
 
`member`, `administrator`, or `moderator`.  Even nonmembers are represented by
8
 
a roster.
 
5
Users represent people in Mailman, members represent subscriptions.  Users
 
6
control email addresses, and rosters are collections of members.  A member
 
7
ties a subscribed email address to a role, such as `member`, `administrator`,
 
8
or `moderator`.  Even non-members are represented by a roster.
9
9
 
10
10
Roster sets are collections of rosters and a mailing list has a single roster
11
11
set that contains all its members, regardless of that member's role.
228
228
    fperson@example.com MemberRole.nonmember
229
229
 
230
230
 
231
 
Double subscriptions
232
 
====================
233
 
 
234
 
It is an error to subscribe someone to a list with the same role twice.
235
 
 
236
 
    >>> mlist.subscribe(address_1, MemberRole.owner)
237
 
    Traceback (most recent call last):
238
 
    ...
239
 
    AlreadySubscribedError: aperson@example.com is already a MemberRole.owner
240
 
    of mailing list ant@example.com
241
 
 
242
 
 
243
231
Moderation actions
244
232
==================
245
233
 
276
264
When a user is subscribed to a mailing list via a specific address they
277
265
control (as opposed to being subscribed with their preferred address), they
278
266
can change their delivery address by setting the appropriate parameter.  Note
279
 
though that the address their changing to must be verified.
 
267
though that the address they're changing to must be verified.
280
268
 
281
269
    >>> bee = create_list('bee@example.com')
282
270
    >>> gwen = user_manager.create_user('gwen@example.com')
290
278
 
291
279
    >>> new_address = gwen.register('gperson@example.com')
292
280
 
293
 
She wants to change her membership in the `test` mailing list to use her new
294
 
address, but the address is not yet verified.
295
 
 
296
 
    >>> gwen_member.address = new_address
297
 
    Traceback (most recent call last):
298
 
    ...
299
 
    UnverifiedAddressError: gperson@example.com
300
 
 
301
 
Her membership has not changed.
302
 
 
303
 
    >>> for m in bee.members.members:
304
 
    ...     print(m.member_id.int, m.mailing_list.list_id, m.address.email)
305
 
    7 bee.example.com gwen@example.com
306
 
 
307
281
Gwen verifies her email address, and updates her membership.
308
282
 
309
283
    >>> from mailman.utilities.datetime import now