aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/admindb.py
diff options
context:
space:
mode:
authormsapiro <>2005-12-03 01:08:58 +0000
committermsapiro <>2005-12-03 01:08:58 +0000
commitd77d0dfed39748444d772bd1c1aacbdb4fbfd20a (patch)
tree21297fc61321b4d6fa51d0650da887fe856cd454 /Mailman/Cgi/admindb.py
parent6dd2b7fdf06cb3a9e6bc461efe3ab17e73dbe939 (diff)
downloadmailman2-d77d0dfed39748444d772bd1c1aacbdb4fbfd20a.tar.gz
mailman2-d77d0dfed39748444d772bd1c1aacbdb4fbfd20a.tar.xz
mailman2-d77d0dfed39748444d772bd1c1aacbdb4fbfd20a.zip
Improving banned subscription logic to cover all invites, subscribes, address changes and confirmations of same.
Diffstat (limited to 'Mailman/Cgi/admindb.py')
-rw-r--r--Mailman/Cgi/admindb.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py
index 1dd0e28a..3f421cfe 100644
--- a/Mailman/Cgi/admindb.py
+++ b/Mailman/Cgi/admindb.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2005 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
@@ -745,6 +745,7 @@ def process_form(mlist, doc, cgidata):
if sender not in mlist.ban_list:
mlist.ban_list.append(sender)
# Now, do message specific actions
+ banaddrs = []
erroraddrs = []
for k in cgidata.keys():
formv = cgidata[k]
@@ -794,8 +795,14 @@ def process_form(mlist, doc, cgidata):
continue
except Errors.MMAlreadyAMember, v:
erroraddrs.append(v)
+ except Errors.MembershipIsBanned, pattern:
+ sender = mlist.GetRecord(request_id)[1]
+ banaddrs.append((sender, pattern))
# save the list and print the results
doc.AddItem(Header(2, _('Database Updated...')))
if erroraddrs:
for addr in erroraddrs:
doc.AddItem(`addr` + _(' is already a member') + '<br>')
+ if banaddrs:
+ for addr, patt in banaddrs:
+ doc.AddItem(_('%(addr)s is banned (matched: %(patt)s)') + '<br>')