aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/roster.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2008-12-07 09:41:12 -0800
committerMark Sapiro <mark@msapiro.net>2008-12-07 09:41:12 -0800
commit2274e704c435716f33ed9dabcb80bef0811ba50c (patch)
tree7148d1d60b9be31e2a36e33d3c0a6dbab117900f /Mailman/Cgi/roster.py
parent2137e2b32bd44f8666369b8469a63d12be59e14d (diff)
downloadmailman2-2274e704c435716f33ed9dabcb80bef0811ba50c.tar.gz
mailman2-2274e704c435716f33ed9dabcb80bef0811ba50c.tar.xz
mailman2-2274e704c435716f33ed9dabcb80bef0811ba50c.zip
Fixed a problem in Decorate which could throw a TypeError on conversion to
unicode of a header/footer that was already unicode because of interpolating a unicode value. Made a minor change to the authentication logic for displaying hidden members on the roster.
Diffstat (limited to '')
-rw-r--r--Mailman/Cgi/roster.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Mailman/Cgi/roster.py b/Mailman/Cgi/roster.py
index b53e5912..8d06777d 100644
--- a/Mailman/Cgi/roster.py
+++ b/Mailman/Cgi/roster.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -72,16 +72,18 @@ def main():
# that, we check roster-email and roster-pw fields for a valid password.
# (also allowed: the list moderator, the list admin, and the site admin).
password = cgidata.getvalue('roster-pw', '')
- list_hidden = mlist.WebAuthenticate((mm_cfg.AuthListModerator,
- mm_cfg.AuthListAdmin,
- mm_cfg.AuthSiteAdmin),
- password)
+ addr = cgidata.getvalue('roster-email', '')
+ list_hidden = (not mlist.WebAuthenticate((mm_cfg.AuthUser,),
+ password, addr)
+ and mlist.WebAuthenticate((mm_cfg.AuthListModerator,
+ mm_cfg.AuthListAdmin,
+ mm_cfg.AuthSiteAdmin),
+ password))
if mlist.private_roster == 0:
# No privacy
ok = 1
elif mlist.private_roster == 1:
# Members only
- addr = cgidata.getvalue('roster-email', '')
ok = mlist.WebAuthenticate((mm_cfg.AuthUser,
mm_cfg.AuthListModerator,
mm_cfg.AuthListAdmin,