aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/confirm.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/confirm.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 '')
-rw-r--r--Mailman/Cgi/confirm.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/Mailman/Cgi/confirm.py b/Mailman/Cgi/confirm.py
index d2cf0cce..6238e72a 100644
--- a/Mailman/Cgi/confirm.py
+++ b/Mailman/Cgi/confirm.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-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
@@ -370,6 +370,11 @@ def subscription_confirm(mlist, doc, cookie, cgidata):
address that has already been unsubscribed.'''))
except Errors.MMAlreadyAMember:
doc.addError(_("You are already a member of this mailing list!"))
+ except Errors.MembershipIsBanned:
+ owneraddr = mlist.GetOwnerEmail()
+ doc.addError(_("""You are currently banned from subscribing to
+ this list. If you think this restriction is erroneous, please
+ contact the list owners at %(owneraddr)s."""))
except Errors.HostileSubscriptionError:
doc.addError(_("""\
You were not invited to this mailing list. The invitation has
@@ -517,6 +522,12 @@ def addrchange_confirm(mlist, doc, cookie):
bad_confirmation(doc, _('''Invalid confirmation string. It is
possible that you are attempting to confirm a request for an
address that has already been unsubscribed.'''))
+ except Errors.MembershipIsBanned:
+ owneraddr = mlist.GetOwnerEmail()
+ realname = mlist.real_name
+ doc.addError(_("""%(newaddr)s is banned from subscribing to the
+ %(realname)s list. If you think this restriction is erroneous,
+ please contact the list owners at %(owneraddr)s."""))
else:
# The response
listname = mlist.real_name