summaryrefslogtreecommitdiff
path: root/src/mailman/chains/builtin.py
diff options
context:
space:
mode:
authorBarry Warsaw2010-12-28 13:14:41 -0500
committerBarry Warsaw2010-12-28 13:14:41 -0500
commitc89087190a641da1353b394a722cf9cee3792394 (patch)
tree4dc1dddcd9fe51d5c11b70f5b50171738563f359 /src/mailman/chains/builtin.py
parent871fe5390bf5c1c6f636ec846b870bdcff86aeaf (diff)
parent13cf4e754334b690711511291f72ae8cc0a7ab16 (diff)
downloadmailman-c89087190a641da1353b394a722cf9cee3792394.tar.gz
mailman-c89087190a641da1353b394a722cf9cee3792394.tar.zst
mailman-c89087190a641da1353b394a722cf9cee3792394.zip
This is part 1 of the merge of Jimmy Bergman's branch
lp:~jimmy-sigint/mailman/restapi_additional_attributes Ostensibly, this adds support for a few additional attributes through the REST API: * default_member_moderation * generic_nonmember_action * member_moderation_action * reply_goes_to_list * send_welcome_msg * welcome_msg However, I had never previously fleshed out the conversion of default_member_moderation and member_moderation_action into the MM3 way of things. That is now done. Non-member moderation still needs to be done. Specific changes: * mailman.chains.base.Chain no longer self registers * The built-in chain gets a new link for checking 'member-moderation'. If this rule matches, it jumps to the 'member-moderation' chain, which checks member_moderation_action and returns a link that jumps to the appropriate terminal chain. * Chain initialization is done by the same auto-detection as rules, handlers, etc. The one tricky thing is that abstract base classes such as Chain and TerminalChainBase can't be instantiated. For now, there's an ugly special case to skip these. * default_member_moderation is now exposed in the IMailingList interface. * Member.is_moderated gets set in the constructor from the mailing list's default_member_moderation. * The 'moderation' rule is renamed 'member-moderation'. TODO: * Work out non-member moderation * Add member_moderation_action to IMailingList * Double check tests for reply_goes_to_list, send_welcome_msg, and welcome_msg
Diffstat (limited to 'src/mailman/chains/builtin.py')
-rw-r--r--src/mailman/chains/builtin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mailman/chains/builtin.py b/src/mailman/chains/builtin.py
index fc31085f3..c81f6700f 100644
--- a/src/mailman/chains/builtin.py
+++ b/src/mailman/chains/builtin.py
@@ -62,6 +62,8 @@ class BuiltInChain:
('suspicious-header', LinkAction.defer, None),
# Now if any of the above hit, jump to the hold chain.
('any', LinkAction.jump, 'hold'),
+ # Hold the message if the sender is a moderated member.
+ ('member-moderation', LinkAction.jump, 'member-moderation'),
# Take a detour through the header matching chain, which we'll create
# later.
('truth', LinkAction.detour, 'header-match'),