diff options
| author | J08nY | 2017-07-05 01:07:37 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-30 13:18:40 +0200 |
| commit | d173b42e5ff5d90167091e6a015d394c2ddd8678 (patch) | |
| tree | aa1f5da977690822e80ce61b7b4cfddd0375cb62 /src/mailman/app/docs/moderator.rst | |
| parent | 34bf9690fd808d1ece8f6c2d674605fc25018894 (diff) | |
| download | mailman-d173b42e5ff5d90167091e6a015d394c2ddd8678.tar.gz mailman-d173b42e5ff5d90167091e6a015d394c2ddd8678.tar.zst mailman-d173b42e5ff5d90167091e6a015d394c2ddd8678.zip | |
Migrate the [un]subscription_policy attribute.
- This is quite a huge commit, since it changes the type of the
MailingList.subscription_policy and unsubscription_policy
attributes to the new names of pluggable workflows, in all
occurences.
- Also adds a migration to migrate the attributes to the new types.
- Adds tests for the migration.
Diffstat (limited to 'src/mailman/app/docs/moderator.rst')
| -rw-r--r-- | src/mailman/app/docs/moderator.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/app/docs/moderator.rst b/src/mailman/app/docs/moderator.rst index ce25a4711..6fcaf0b08 100644 --- a/src/mailman/app/docs/moderator.rst +++ b/src/mailman/app/docs/moderator.rst @@ -224,7 +224,7 @@ Fred is a member of the mailing list... >>> from mailman.interfaces.subscriptions import ISubscriptionManager >>> registrar = ISubscriptionManager(mlist) >>> token, token_owner, member = registrar.register( - ... fred, pre_verified=True, pre_confirmed=True, pre_approved=True) + ... fred, pre_verified=True, pre_confirmed=True) >>> member <Member: Fred Person <fred@example.com> on ant@example.com as MemberRole.member> @@ -301,16 +301,16 @@ Usually, the list administrators want to be notified when there are membership change requests they need to moderate. These notifications are sent when the list is configured to send them. - >>> from mailman.interfaces.mailinglist import SubscriptionPolicy + >>> from mailman.workflows.subscription import ModerationSubscriptionPolicy >>> mlist.admin_immed_notify = True - >>> mlist.subscription_policy = SubscriptionPolicy.moderate + >>> mlist.subscription_policy = ModerationSubscriptionPolicy Gwen tries to subscribe to the mailing list. >>> gwen = getUtility(IUserManager).create_address( ... 'gwen@example.com', 'Gwen Person') >>> token, token_owner, member = registrar.register( - ... gwen, pre_verified=True, pre_confirmed=True) + ... gwen, pre_verified=True) Her subscription must be approved by the list administrator, so she is not yet a member of the mailing list. @@ -414,7 +414,7 @@ message. >>> herb = getUtility(IUserManager).create_address( ... 'herb@example.com', 'Herb Person') >>> token, token_owner, member = registrar.register( - ... herb, pre_verified=True, pre_confirmed=True, pre_approved=True) + ... herb, pre_verified=True, pre_approved=True) >>> messages = get_queue_messages('virgin') >>> len(messages) 1 |
