Changeset 1875 for pykota/trunk/pykota

Show
Ignore:
Timestamp:
10/25/04 16:12:25 (20 years ago)
Author:
jalet
Message:

For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf
to hide print jobs' title, filename, and options.

Location:
pykota/trunk/pykota
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/config.py

    r1785 r1875  
    2222# 
    2323# $Log$ 
     24# Revision 1.54  2004/10/25 14:12:25  jalet 
     25# For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
     26# to hide print jobs' title, filename, and options. 
     27# 
    2428# Revision 1.53  2004/10/06 10:05:47  jalet 
    2529# Minor changes to allow any PyKota administrator to launch enhanced versions 
     
    524528            return _("You will soon be forbidden to print anymore because\nyour Print Quota is almost reached on printer %s.") % printername 
    525529             
     530    def getPrivacy(self) :         
     531        """Returns 1 if privacy is activated, else 0.""" 
     532        return self.isTrue(self.getGlobalOption("privacy", ignore=1)) 
     533         
    526534    def getDebug(self) :           
    527535        """Returns 1 if debugging is activated, else 0.""" 
  • pykota/trunk/pykota/storage.py

    r1791 r1875  
    2222# 
    2323# $Log$ 
     24# Revision 1.65  2004/10/25 14:12:25  jalet 
     25# For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
     26# to hide print jobs' title, filename, and options. 
     27# 
    2428# Revision 1.64  2004/10/08 20:19:18  jalet 
    2529# Added ugly workaround for strange locale problem 
     
    550554        self.usecache = pykotatool.config.getCaching() 
    551555        self.disablehistory = pykotatool.config.getDisableHistory() 
     556        self.privacy = pykotatool.config.getPrivacy() 
     557        if self.privacy : 
     558            pykotatool.logdebug("Jobs' title, filename and options will be hidden because of privacy concerns.") 
    552559        if self.usecache : 
    553560            self.tool.logdebug("Caching enabled.") 
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1874 r1875  
    2222# 
    2323# $Log$ 
     24# Revision 1.86  2004/10/25 14:12:25  jalet 
     25# For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
     26# to hide print jobs' title, filename, and options. 
     27# 
    2428# Revision 1.85  2004/10/24 12:55:09  jalet 
    2529# Missing spaces 
     
    10871091            uuid = printer.LastJob.ident[3:].split(",")[0] 
    10881092            dn = printer.LastJob.ident 
     1093        if self.privacy :     
     1094            # For legal reasons, we want to hide the title, filename and options 
     1095            title = filename = options = "Hidden because of privacy concerns" 
    10891096        fields = { 
    10901097                   "objectClass" : ["pykotaObject", "pykotaJob"], 
  • pykota/trunk/pykota/storages/sql.py

    r1806 r1875  
    2222# 
    2323# $Log$ 
     24# Revision 1.59  2004/10/25 14:12:25  jalet 
     25# For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
     26# to hide print jobs' title, filename, and options. 
     27# 
    2428# Revision 1.58  2004/10/12 08:58:53  jalet 
    2529# Now warnpykota only warns users who have already printed, to not confuse 
     
    483487    def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None, clienthost=None, jobsizebytes=None) : 
    484488        """Adds a job in a printer's history.""" 
     489        if self.privacy :     
     490            # For legal reasons, we want to hide the title, filename and options 
     491            title = filename = options = "Hidden because of privacy concerns" 
    485492        filename = self.userCharsetToDatabase(filename) 
    486493        title = self.userCharsetToDatabase(title)