Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1:/tmp/cvs-serv11287
Modified Files:
Tag: Release_2_1-maint
MailList.py
Log Message:
ApprovedChangeMemberAddress(): When someone requests to change their
address globally, it is possible the new address is already a member
of this (or one of the other) lists. In that case, the old address is
removed.
Closes SF # 835036.
Index: MailList.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MailList.py,v
retrieving revision 2.100.2.8
retrieving revision 2.100.2.9
diff -u -d -r2.100.2.8 -r2.100.2.9
--- MailList.py 24 Nov 2003 23:52:46 -0000 2.100.2.8
+++ MailList.py 25 Nov 2003 02:09:40 -0000 2.100.2.9
@@ -1041,7 +1041,13 @@
msg.send(self)
def ApprovedChangeMemberAddress(self, oldaddr, newaddr, globally):
- self.changeMemberAddress(oldaddr, newaddr)
+ # It's possible they were a member of this list, but choose to change
+ # their membership globally. In that case, we simply remove the old
+ # address.
+ if self.isMember(newaddr):
+ self.removeMember(oldaddr)
+ else:
+ self.changeMemberAddress(oldaddr, newaddr)
# If globally is true, then we also include every list for which
# oldaddr is a member.
if not globally:
@@ -1057,7 +1063,11 @@
continue
mlist.Lock()
try:
- mlist.changeMemberAddress(oldaddr, newaddr)
+ # Same logic as above, re newaddr is already a member
+ if mlist.isMember(newaddr):
+ mlist.removeMember(oldaddr)
+ else:
+ mlist.changeMemberAddress(oldaddr, newaddr)
mlist.Save()
finally:
mlist.Unlock()
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins