Changeset 1227
- Timestamp:
- 11/29/03 21:06:20 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r1226 r1227 134 134 # If the value is not set then localhost is used. 135 135 smtpserver: localhost 136 137 # Should we force usernames to be all lowercase when printing ? 138 # Default is No. 139 # This is a global option only. 140 # Some people reported that WinXP sends mixed case usernames 141 # setting 'utolower: Yes' solves the problem. 142 # Of course you have to user lowercase only when adding 143 # users with edpykota, because ALL database accesses are 144 # still case sensitive. 145 # 146 # If utolower is Yes, the usernames received from the printing 147 # system is converted to lowercase at the start of the cupspykota 148 # backend or of the pykota filter. 149 # 150 # If utolower is No, which is the default, strict case checking 151 # is done, this means that users 'Jerome' and 'jerome' are 152 # different. Printer and groups names are ALWAYS case sensitive. 153 utolower: No 136 154 137 155 # What is the accounting backend to use -
pykota/trunk/NEWS
r1226 r1227 22 22 PyKota NEWS : 23 23 24 - 1.16alpah16 : 25 26 - Added utolower configuration option to convert all usernames 27 to lowercase during printing. 28 24 29 - 1.15alpha15 : 25 30 -
pykota/trunk/pykota/config.py
r1192 r1227 22 22 # 23 23 # $Log$ 24 # Revision 1.41 2003/11/29 20:06:20 jalet 25 # Added 'utolower' configuration option to convert all usernames to 26 # lowercase when printing. All database accesses are still and will 27 # remain case sensitive though. 28 # 24 29 # Revision 1.40 2003/11/18 23:43:12 jalet 25 30 # Mailto can be any external command now, as usual. … … 197 202 self.config = ConfigParser.ConfigParser() 198 203 self.config.read([self.filename]) 204 205 def isTrue(self, option) : 206 """Returns 1 if option is set to true, else 0.""" 207 if (option is not None) and (option.upper().strip() in ['Y', 'YES', '1', 'ON', 'T', 'TRUE']) : 208 return 1 209 else : 210 return 0 199 211 200 212 def getPrinterNames(self) : … … 439 451 def getDebug(self) : 440 452 """Returns 1 if debugging is activated, else 0.""" 441 debug = self.getGlobalOption("debug", ignore=1) 442 if (debug is not None) and (debug.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) : 443 return 1 444 else : 445 return 0 453 return self.isTrue(self.getGlobalOption("debug", ignore=1)) 446 454 447 455 def getCaching(self) : 448 456 """Returns 1 if database caching is enabled, else 0.""" 449 caching = self.getGlobalOption("storagecaching", ignore=1) 450 if (caching is not None) and (caching.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) : 451 return 1 452 else : 453 return 0 457 return self.isTrue(self.getGlobalOption("storagecaching", ignore=1)) 454 458 455 459 def getDisableHistory(self) : 456 460 """Returns 1 if we want to disable history, else 0.""" 457 disablehistory = self.getGlobalOption("disablehistory", ignore=1)458 if (disablehistory is not None) and (disablehistory.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) :459 return 1460 else :461 return 0461 return self.isTrue(self.getGlobalOption("disablehistory", ignore=1)) 462 463 def getUserNameToLower(self) : 464 """Returns 1 if we want to convert usernames to lowercase when printing, else 0.""" 465 return self.isTrue(self.getGlobalOption("utolower", ignore=1)) -
pykota/trunk/pykota/tool.py
r1218 r1227 22 22 # 23 23 # $Log$ 24 # Revision 1.63 2003/11/29 20:06:20 jalet 25 # Added 'utolower' configuration option to convert all usernames to 26 # lowercase when printing. All database accesses are still and will 27 # remain case sensitive though. 28 # 24 29 # Revision 1.62 2003/11/25 22:37:22 jalet 25 30 # Small code move … … 640 645 self.originalbackend) = self.extractInfoFromCupsOrLprng() 641 646 self.username = self.username or 'root' 647 if self.config.getUserNameToLower() : 648 self.username = self.username.lower() 642 649 self.preserveinputfile = self.inputfile 643 650 self.accounter = accounter.openAccounter(self) -
pykota/trunk/pykota/version.py
r1226 r1227 22 22 # 23 23 24 __version__ = "1.16alpha1 5_unofficial"24 __version__ = "1.16alpha16_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""