summaryrefslogtreecommitdiff
path: root/src/mailman/rules/docs
diff options
context:
space:
mode:
authorAurélien Bompard2016-02-09 12:23:38 +0100
committerBarry Warsaw2016-03-31 18:29:27 -0400
commit71cfeda5fb51c49fd87b6d34e00221a3725b9ec0 (patch)
treed571db90e7010643ea7cca81ab91eaee89e0f378 /src/mailman/rules/docs
parent011d278abcc25d417673f70a4eac0a8a78137d95 (diff)
downloadmailman-71cfeda5fb51c49fd87b6d34e00221a3725b9ec0.tar.gz
mailman-71cfeda5fb51c49fd87b6d34e00221a3725b9ec0.tar.zst
mailman-71cfeda5fb51c49fd87b6d34e00221a3725b9ec0.zip
Members and nonmembers moderation action fallback
Members and nonmember's moderation action should be None by default, and in that case the moderation rule should fallback to the mailing list's default action. Fixes: #189
Diffstat (limited to 'src/mailman/rules/docs')
-rw-r--r--src/mailman/rules/docs/moderation.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mailman/rules/docs/moderation.rst b/src/mailman/rules/docs/moderation.rst
index f5ceec29a..56602189b 100644
--- a/src/mailman/rules/docs/moderation.rst
+++ b/src/mailman/rules/docs/moderation.rst
@@ -2,9 +2,10 @@
Moderation
==========
-All members and nonmembers have a moderation action. When the action is not
-`defer`, the `moderation` rule flags the message as needing moderation. This
-might be to automatically accept, discard, reject, or hold the message.
+All members and nonmembers have a moderation action, which defaults to the
+list's default action. When the action is not `defer`, the `moderation` rule
+flags the message as needing moderation. This might be to automatically
+accept, discard, reject, or hold the message.
Two separate rules check for member and nonmember moderation. Member
moderation happens early in the built-in chain, while nonmember moderation
@@ -30,7 +31,7 @@ postings are not moderated.
as MemberRole.member>
>>> member = mlist.members.get_member('aperson@example.com')
- >>> print(member.moderation_action)
+ >>> print(mlist.default_member_action)
Action.defer
Because Anne is not moderated, the member moderation rule does not match.
@@ -44,9 +45,9 @@ Because Anne is not moderated, the member moderation rule does not match.
>>> member_rule.check(mlist, member_msg, {})
False
-Once the member's moderation action is set to something other than `defer`,
-the rule matches. Also, the message metadata has a few extra pieces of
-information for the eventual moderation chain.
+Once the member's moderation action is set to something other than `defer` or
+``None``, the rule matches. Also, the message metadata has a few extra pieces
+of information for the eventual moderation chain.
>>> from mailman.interfaces.action import Action
>>> member.moderation_action = Action.hold
@@ -78,7 +79,7 @@ Bart, who is not a member of the mailing list, sends a message to the list.
as MemberRole.nonmember>
>>> nonmember = mlist.nonmembers.get_member('bperson@example.com')
- >>> print(nonmember.moderation_action)
+ >>> print(mlist.default_nonmember_action)
Action.hold
When Bart is registered as a nonmember of the list, his moderation action is