diff options
author | msapiro <> | 2007-03-20 23:12:18 +0000 |
---|---|---|
committer | msapiro <> | 2007-03-20 23:12:18 +0000 |
commit | 6e46e0d932be4643426d2e7f5037a29039a58207 (patch) | |
tree | 7b8024a03767b6235dac3c091fa2936a246b5ad0 /Mailman | |
parent | 329a23cb28d87ed14627bf7a59b64e57ac594666 (diff) | |
download | mailman2-6e46e0d932be4643426d2e7f5037a29039a58207.tar.gz mailman2-6e46e0d932be4643426d2e7f5037a29039a58207.tar.xz mailman2-6e46e0d932be4643426d2e7f5037a29039a58207.zip |
- Fixed a bug in OldStyleMemberships.addNewMember that allowed adding an address
with upper case in the domain if the local part was all lower case.
- Changed the semantics of OldStyleMemberships.changeMemberAddress os that
in the case of a straightforward address change, i.e. nodelete = 0,
delivery status and time are preserved if BYUSER or BYADMIN.
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/OldStyleMemberships.py | 14 |
1 files changed, 11 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() |