summaryrefslogtreecommitdiff
path: root/Mailman/SecurityManager.py
diff options
context:
space:
mode:
authorbwarsaw2002-01-06 07:52:21 +0000
committerbwarsaw2002-01-06 07:52:21 +0000
commita0216a6d1257d651579558ea4774226b3fe09e5d (patch)
tree15434792c084e7fbc59036132b4c662fa3730b06 /Mailman/SecurityManager.py
parentb09ab16f993c9a20884c0bf30d0f61d62cb88536 (diff)
downloadmailman-a0216a6d1257d651579558ea4774226b3fe09e5d.tar.gz
mailman-a0216a6d1257d651579558ea4774226b3fe09e5d.tar.zst
mailman-a0216a6d1257d651579558ea4774226b3fe09e5d.zip
Diffstat (limited to 'Mailman/SecurityManager.py')
-rw-r--r--Mailman/SecurityManager.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/Mailman/SecurityManager.py b/Mailman/SecurityManager.py
index 41608f528..9950600eb 100644
--- a/Mailman/SecurityManager.py
+++ b/Mailman/SecurityManager.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2002 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
@@ -111,12 +111,17 @@ class SecurityManager:
key += 'admin'
# BAW: AuthCreator
elif authcontext == mm_cfg.AuthSiteAdmin:
- # BAW: this should probably hand out a site password based cookie,
- # but that makes me a bit nervous, so just treat site admin as a
- # list admin since there is currently no site admin-only
- # functionality.
- secret = self.password
- key += 'admin'
+ sitepass = Utils.get_global_password()
+ if mm_cfg.ALLOW_SITE_ADMIN_COOKIES and sitepass:
+ secret = sitepass
+ key = 'site'
+ else:
+ # BAW: this should probably hand out a site password based
+ # cookie, but that makes me a bit nervous, so just treat site
+ # admin as a list admin since there is currently no site
+ # admin-only functionality.
+ secret = self.password
+ key += 'admin'
else:
return None, None
return key, secret