From d77d0dfed39748444d772bd1c1aacbdb4fbfd20a Mon Sep 17 00:00:00 2001 From: msapiro <> Date: Sat, 3 Dec 2005 01:08:58 +0000 Subject: Improving banned subscription logic to cover all invites, subscribes, address changes and confirmations of same. --- Mailman/Cgi/confirm.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Mailman/Cgi/confirm.py') 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 -- cgit v1.2.3