Changeset 3012

Show
Ignore:
Timestamp:
09/06/06 22:06:13 (18 years ago)
Author:
jerome
Message:

Exports two additional environment variables.

Location:
pykota/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r3008 r3012  
    279279        # use CUPS' user when printing test pages from CUPS' web interface 
    280280        self.UserName = sys.argv[2].strip() or self.originalUserName or pwd.getpwuid(os.geteuid())[0] 
     281        self.OriginalUserName = self.UserName[:] 
    281282        self.Title = sys.argv[3].strip() 
    282283        self.Copies = int(sys.argv[4].strip()) 
     
    356357            jbing = jbing[-1] 
    357358        (jbtype, self.JobBillingCode) = jbing 
    358          
     359        if self.JobBillingCode is None : 
     360            self.OriginalJobBillingCode = None 
     361        else :     
     362            self.OriginalJobBillingCode = self.JobBillingCode[:] 
     363             
    359364        baselockfilename = self.DeviceURI.replace("/", ".") 
    360365        baselockfilename = baselockfilename.replace(":", ".") 
     
    647652        os.environ["PYKOTAJOBID"] = self.JobId 
    648653        os.environ["PYKOTAUSERNAME"] = self.UserName 
     654        os.environ["PYKOTAORIGINALUSERNAME"] = self.OriginalUserName 
    649655        os.environ["PYKOTATITLE"] = self.Title 
    650656        os.environ["PYKOTACOPIES"] = str(self.Copies) 
     
    652658        os.environ["PYKOTAFILENAME"] = self.InputFile or "" 
    653659        os.environ["PYKOTAJOBBILLING"] = self.JobBillingCode or "" 
     660        os.environ["PYKOTAORIGINALJOBBILLING"] = self.OriginalJobBillingCode or "" 
    654661        os.environ["PYKOTACONTROLFILE"] = self.ControlFile 
    655662        os.environ["PYKOTAPRINTERHOSTNAME"] = self.PrinterHostName 
  • pykota/trunk/conf/pykota.conf.sample

    r2965 r3012  
    897897# PYKOTAPHASE : BEFORE or AFTER the job is sent to the printer 
    898898# PYKOTAACTION : ALLOW or DENY or WARN for current print job 
    899 # PYKOTAUSERNAME : user's name 
     899# PYKOTAUSERNAME : user's name, possibly modified through the overwrite_jobticket directive. 
     900# PYKOTAORIGINALUSERNAME : user's name, unmodified. 
    900901# PYKOTAPRINTERNAME : printer's name 
    901902# PYKOTAPGROUPS : list of printers groups the current printer is a member of 
     
    925926#                   page was still printed on the current printer.                    
    926927# PYKOTAOVERCHARGE : user's overcharging factor. 
    927 # PYKOTAJOBBILLING : Job's billing code if present (CUPS only) 
     928# PYKOTAJOBBILLING : Job's billing code if present, possibly modified through the overwrite_jobticket directive. 
     929# PYKOTAORIGINALJOBBILLING : Job's billing code if present, unmodified. 
    928930# PYKOTAREASON : if the job was denied or a warning needs to be issued, contains 
    929931#                the message to send to the user. 
  • pykota/trunk/NEWS

    r3008 r3012  
    2222PyKota NEWS : 
    2323        
     24    - 1.25alpha11 (2006-09-06) : 
     25     
     26        - Now fails in an helpful manner if python-mysqldb is too old. 
     27         
     28        - Now exports the original username and billing code (i.e. 
     29          their values before they are eventually overwritten) in 
     30          two additionnal environment variables. 
     31           
    2432    - 1.25alpha10 (2006-09-03) : 
    2533     
  • pykota/trunk/pykota/version.py

    r3007 r3012  
    2222# 
    2323 
    24 __version__ = "1.25alpha10_unofficial" 
     24__version__ = "1.25alpha11_unofficial" 
    2525 
    2626__doc__ = "PyKota : a complete Printing Quota Solution for CUPS." 
  • pykota/trunk/TODO

    r3011 r3012  
    1 # $Id$ 
     1it's a pyt# $Id$ 
    22 
    33PyKota - Print Quotas for CUPS and LPRng 
     
    2929          deleting it. 
    3030         
    31         - Exports the original username and billing code in two 
    32           additional environment variables (in case they are 
    33           overwritten later). 
    34            
    3531        - Improve the documentation of edpykota's --printer command 
    3632          line option.