diff options
| author | Barry Warsaw | 2010-12-28 13:14:41 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2010-12-28 13:14:41 -0500 |
| commit | c89087190a641da1353b394a722cf9cee3792394 (patch) | |
| tree | 4dc1dddcd9fe51d5c11b70f5b50171738563f359 /src/mailman/rules/docs | |
| parent | 871fe5390bf5c1c6f636ec846b870bdcff86aeaf (diff) | |
| parent | 13cf4e754334b690711511291f72ae8cc0a7ab16 (diff) | |
| download | mailman-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/rules/docs')
| -rw-r--r-- | src/mailman/rules/docs/moderation.txt | 7 | ||||
| -rw-r--r-- | src/mailman/rules/docs/rules.txt | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mailman/rules/docs/moderation.txt b/src/mailman/rules/docs/moderation.txt index 73a6b111d..96ad8b6c3 100644 --- a/src/mailman/rules/docs/moderation.txt +++ b/src/mailman/rules/docs/moderation.txt @@ -8,9 +8,9 @@ email the list without having those messages be held for approval. The 'moderation' rule determines whether the message should be moderated or not. >>> mlist = create_list('_xtest@example.com') - >>> rule = config.rules['moderation'] + >>> rule = config.rules['member-moderation'] >>> print rule.name - moderation + member-moderation In the simplest case, the sender is not a member of the mailing list, so the moderation rule can't match. @@ -25,13 +25,14 @@ moderation rule can't match. False Let's add the message author as a non-moderated member. -:: >>> from mailman.interfaces.usermanager import IUserManager >>> from zope.component import getUtility >>> user = getUtility(IUserManager).create_user( ... 'aperson@example.org', 'Anne Person') +Because the member is not moderated, the rule does not match. + >>> address = list(user.addresses)[0] >>> from mailman.interfaces.member import MemberRole >>> member = address.subscribe(mlist, MemberRole.member) diff --git a/src/mailman/rules/docs/rules.txt b/src/mailman/rules/docs/rules.txt index 2d59203f8..056e39cab 100644 --- a/src/mailman/rules/docs/rules.txt +++ b/src/mailman/rules/docs/rules.txt @@ -26,7 +26,7 @@ names to rule objects. loop True max-recipients True max-size True - moderation True + member-moderation True news-moderation True no-subject True non-member True |
