diff options
| author | bwarsaw | 2001-05-31 21:16:29 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-31 21:16:29 +0000 |
| commit | 669d5dc5f59ce37c47b0eeb2a4b823435d9067bd (patch) | |
| tree | 9a97db275b7e8825c7424af74141d7be654a5a0c | |
| parent | 6b56b60572a818c4b1ee6f66174d89f0dd183566 (diff) | |
| download | mailman-669d5dc5f59ce37c47b0eeb2a4b823435d9067bd.tar.gz mailman-669d5dc5f59ce37c47b0eeb2a4b823435d9067bd.tar.zst mailman-669d5dc5f59ce37c47b0eeb2a4b823435d9067bd.zip | |
| -rw-r--r-- | Mailman/Cgi/admindb.py | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index d287a5fdc..4952b32ee 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -66,10 +66,17 @@ def main(): # Make sure the user is authorized to see this page. cgidata = cgi.FieldStorage() - try: - Auth.authenticate(mlist, cgidata) - except Auth.NotLoggedInError, e: - Auth.loginpage(mlist, 'admindb', e.message) + + if not mlist.WebAuthenticate((mm_cfg.AuthListAdmin, + mm_cfg.AuthListModerator, + mm_cfg.AuthSiteAdmin), + cgidata.getvalue('adminpw', '')): + if cgidata.has_key('admlogin'): + # This is a re-authorization attempt + msg = Bold(FontSize('+1', _('Authorization failed.'))).Format() + else: + msg = '' + Auth.loginpage(mlist, 'admindb', msg=msg) return # Set up the results document @@ -112,7 +119,7 @@ def main(): finally: mlist.Unlock() - print doc.Format(bgcolor='#ffffff') + print doc.Format() @@ -125,14 +132,12 @@ def handle_no_list(msg=''): doc.SetTitle(header) doc.AddItem(Header(2, header)) doc.AddItem(msg) - doc.AddItem(_('You must specify a list name. Here is the ')) - # Server's top level URL -- it must end in a slash! - link = mm_cfg.DEFAULT_URL - if not link.endswith('/'): - link += '/' - link += 'admin' - doc.AddItem(Link(link, _('list of available mailing lists.'))) - print doc.Format(bgcolor="#ffffff") + url = Utils.ScriptURL('admin', absolute=1) + link = Link(url, _('list of available mailing lists.')).Format() + doc.AddItem(_('You must specify a list name. Here is the %(link)s')) + doc.AddItem('<hr>') + doc.AddItem(MailmanLogo()) + print doc.Format() |
