aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Gui
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-01-22 16:09:03 -0800
committerMark Sapiro <mark@msapiro.net>2015-01-22 16:09:03 -0800
commit4758a0d904a12d6be21972fa432ad89ed9c1a768 (patch)
tree85d88b27697dd72a55d6470d9e88487bf29568c9 /Mailman/Gui
parentac22662b811ac9bcf58cf001c8fd5ad21e757c8b (diff)
downloadmailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.tar.gz
mailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.tar.xz
mailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.zip
A number of changes from the unofficial 2.2 branch have been backported to
the 2.1 branch for release with 2.1.19. The 2.2 branch is now no different from the 2.1 branch and will no longer be maintained.
Diffstat (limited to 'Mailman/Gui')
-rw-r--r--Mailman/Gui/Privacy.py11
-rw-r--r--Mailman/Gui/Topics.py10
2 files changed, 16 insertions, 5 deletions
diff --git a/Mailman/Gui/Privacy.py b/Mailman/Gui/Privacy.py
index 7f1e12f3..3c32bf50 100644
--- a/Mailman/Gui/Privacy.py
+++ b/Mailman/Gui/Privacy.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2014 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2015 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -113,6 +113,15 @@ class Privacy(GUIBase):
sub_cfentry,
+ ('subscribe_auto_approval', mm_cfg.EmailListEx, (10, WIDTH), 1,
+ _("""List of addresses (or regexps) whose subscriptions do not
+ require approval."""),
+
+ _("""When subscription requires approval, addresses in this list
+ are allowed to subscribe without administrator approval. Add
+ addresses one per line. You may begin a line with a ^ character
+ to designate a (case insensitive) regular expression match.""")),
+
('unsubscribe_policy', mm_cfg.Radio, (_('No'), _('Yes')), 0,
_("""Is the list moderator's approval required for unsubscription
requests? (<em>No</em> is recommended)"""),
diff --git a/Mailman/Gui/Topics.py b/Mailman/Gui/Topics.py
index 96f9b421..ec60dbda 100644
--- a/Mailman/Gui/Topics.py
+++ b/Mailman/Gui/Topics.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2015 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -29,6 +29,8 @@ except NameError:
True = 1
False = 0
+OR = '|'
+
class Topics(GUIBase):
@@ -126,10 +128,10 @@ class Topics(GUIBase):
# Make sure the pattern was a legal regular expression
name = Utils.websafe(name)
try:
- # Tagger compiles in verbose mode so we do too.
- re.compile(pattern, re.VERBOSE)
+ orpattern = OR.join(pattern.splitlines())
+ re.compile(orpattern)
except (re.error, TypeError):
- safepattern = Utils.websafe(pattern)
+ safepattern = Utils.websafe(orpattern)
doc.addError(_("""The topic pattern '%(safepattern)s' is not a
legal regular expression. It will be discarded."""))
continue