Show
Ignore:
Timestamp:
03/25/06 22:21:30 (18 years ago)
Author:
jerome
Message:

Changed the behavior of the overwrite_jobticket directive : it's now
impossible to overwrite the username when the job has to be denied
or cancelled (although for cancelled I'm not sure if this is a good
or a bad idea).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2797 r2803  
    329329                    username = line.split("=", 1)[1].strip() 
    330330                    self.logdebug("Seen new username [%s]" % username) 
    331                     action = None 
    332331                elif line.startswith("BILLINGCODE=") :     
    333332                    billingcode = line.split("=", 1)[1].strip() 
    334333                    self.logdebug("Seen new billing code [%s]" % billingcode) 
    335                     action = None 
    336334            inputfile.close()     
    337335            self.dropPriv() 
     
    345343                self.Reason = _("Print job cancelled.") 
    346344                os.environ["PYKOTASTATUS"] = "CANCELLED" 
    347             if username : 
    348                 self.UserName = username 
     345            elif username : 
     346                self.UserName = username # If cancelled or denied, we don't allow username to be overwritten 
    349347            # NB : we overwrite the billing code even if empty     
    350348            self.JobBillingCode = billingcode