diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/OldStyleMemberships.py | 14 | ||||
-rw-r--r-- | NEWS | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Mailman/OldStyleMemberships.py b/Mailman/OldStyleMemberships.py index 3222c2ae..f28c08db 100644 --- a/Mailman/OldStyleMemberships.py +++ b/Mailman/OldStyleMemberships.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2003 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2007 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 @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Old style Mailman membership adaptor. @@ -201,7 +202,7 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): value = 0 else: value = member - member = member.lower() + member = member.lower() if digest: self.__mlist.digest_members[member] = value else: @@ -243,6 +244,8 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): password = self.__mlist.passwords.get(memberkey, Utils.MakeRandomPassword()) lang = self.getMemberLanguage(memberkey) + delivery = self.__mlist.delivery_status.get(member.lower(), + (MemberAdaptor.ENABLED,0)) # First, possibly delete the old member if not nodelete: self.removeMember(memberkey) @@ -252,6 +255,11 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): # Set the entire options bitfield if flags: self.__mlist.user_options[newaddress.lower()] = flags + # If this is a straightforward address change, i.e. nodelete = 0, + # preserve the delivery status and time if BYUSER or BYADMIN + if delivery[0] in (MemberAdaptor.BYUSER, MemberAdaptor.BYADMIN)\ + and not nodelete: + self.__mlist.delivery_status[newaddress.lower()] = delivery def setMemberPassword(self, memberkey, password): assert self.__mlist.Locked() @@ -14,6 +14,10 @@ Here is a history of user visible changes to Mailman. list's admin or moderator password and to accept the password if the roster is public. + - Changed OldStyleMemberships.py to preserve delivery statuses BYADMIN + and BYUSER on a straight change of address. Also fixed a bug that + could result in a member key with uppercase in the domain. + 2.1.9 (12-Sep-2006) Security |