Update of /cvsroot/mailman/mailman/Mailman/Cgi
In directory usw-pr-cvs1:/tmp/cvs-serv24187

Modified Files:
        admindb.py 
Log Message:
main(): Convert to the new world order for web authentication,
allowing the list-admin, list-moderator, or site-moderator access to
the admindb.  Also, don't hard code the background color.

handle_no_list(): Clean this up by using Utils.ScriptURL() to give us
the url to the admin overview page.


Index: admindb.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Cgi/admindb.py,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -r2.11 -r2.12
*** admindb.py  2001/05/18 20:16:22     2.11
--- admindb.py  2001/05/31 21:16:29     2.12
***************
*** 67,74 ****
      # 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)
          return
  
--- 67,81 ----
      # Make sure the user is authorized to see this page.
      cgidata = cgi.FieldStorage()
! 
!     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
  
***************
*** 113,117 ****
          mlist.Unlock()
  
!     print doc.Format(bgcolor='#ffffff')
  
  
--- 120,124 ----
          mlist.Unlock()
  
!     print doc.Format()
  
  
***************
*** 126,137 ****
      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")
  
  
--- 133,142 ----
      doc.AddItem(Header(2, header))
      doc.AddItem(msg)
!     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()
  
  


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to