Show
Ignore:
Timestamp:
01/19/05 09:49:41 (20 years ago)
Author:
jalet
Message:

Now dumpykota.cgi behaves like printquota.cgi wrt the REMOTE_USER environment
variables if the script is username+password protected.
Small fix in printquota.cgi wrt ldap auth with Apache : the workaround was
not used everywhere.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/printquota.cgi

    r2028 r2032  
    2424# 
    2525# $Log$ 
     26# Revision 1.44  2005/01/19 08:49:41  jalet 
     27# Now dumpykota.cgi behaves like printquota.cgi wrt the REMOTE_USER environment 
     28# variables if the script is username+password protected. 
     29# Small fix in printquota.cgi wrt ldap auth with Apache : the workaround was 
     30# not used everywhere. 
     31# 
    2632# Revision 1.43  2005/01/17 08:44:24  jalet 
    2733# Modified copyright years 
     
    255261        """Main function""" 
    256262        printers = ugmask = isgroup = None 
     263        remuser = os.environ.get("REMOTE_USER", "root")     
     264        # special hack to accomodate mod_auth_ldap Apache module 
     265        try : 
     266            remuser = remuser.split("=")[1].split(",")[0] 
     267        except IndexError :     
     268            pass 
    257269        self.body = "<p>%s</p>\n" % _("Please click on the above button") 
    258270        if self.form.has_key("report") : 
     
    264276            else :     
    265277                printers = self.storage.getMatchingPrinters("*") 
    266             remuser = os.environ.get("REMOTE_USER", "root")     
    267              
    268             # special hack to accomodate mod_auth_ldap Apache module 
    269             try : 
    270                 remuser = remuser.split("=")[1].split(",")[0] 
    271             except IndexError :     
    272                 pass 
    273              
    274278            if remuser == "root" : 
    275279                if self.form.has_key("ugmask") :      
     
    300304                self.body += "%s" % self.reportingtool.generateReport() 
    301305        else :         
    302             remuser = os.environ.get("REMOTE_USER", "root")     
    303306            if remuser != "root" : 
    304307                username = remuser