Index: /pykota/trunk/conf/pykota.conf.sample
===================================================================
--- /pykota/trunk/conf/pykota.conf.sample (revision 1226)
+++ /pykota/trunk/conf/pykota.conf.sample (revision 1227)
@@ -134,4 +134,22 @@
 # If the value is not set then localhost is used.
 smtpserver: localhost
+
+# Should we force usernames to be all lowercase when printing ?
+# Default is No. 
+# This is a global option only.
+# Some people reported that WinXP sends mixed case usernames
+# setting 'utolower: Yes' solves the problem.
+# Of course you have to user lowercase only when adding
+# users with edpykota, because ALL database accesses are
+# still case sensitive.
+#
+# If utolower is Yes, the usernames received from the printing
+# system is converted to lowercase at the start of the cupspykota
+# backend or of the pykota filter.
+#
+# If utolower is No, which is the default, strict case checking
+# is done, this means that users 'Jerome' and 'jerome' are
+# different. Printer and groups names are ALWAYS case sensitive.
+utolower: No
 
 # What is the accounting backend to use
Index: /pykota/trunk/pykota/tool.py
===================================================================
--- /pykota/trunk/pykota/tool.py (revision 1218)
+++ /pykota/trunk/pykota/tool.py (revision 1227)
@@ -22,4 +22,9 @@
 #
 # $Log$
+# Revision 1.63  2003/11/29 20:06:20  jalet
+# Added 'utolower' configuration option to convert all usernames to
+# lowercase when printing. All database accesses are still and will
+# remain case sensitive though.
+#
 # Revision 1.62  2003/11/25 22:37:22  jalet
 # Small code move
@@ -640,4 +645,6 @@
          self.originalbackend) = self.extractInfoFromCupsOrLprng()
         self.username = self.username or 'root' 
+        if self.config.getUserNameToLower() :
+            self.username = self.username.lower()
         self.preserveinputfile = self.inputfile 
         self.accounter = accounter.openAccounter(self)
Index: /pykota/trunk/pykota/config.py
===================================================================
--- /pykota/trunk/pykota/config.py (revision 1192)
+++ /pykota/trunk/pykota/config.py (revision 1227)
@@ -22,4 +22,9 @@
 #
 # $Log$
+# Revision 1.41  2003/11/29 20:06:20  jalet
+# Added 'utolower' configuration option to convert all usernames to
+# lowercase when printing. All database accesses are still and will
+# remain case sensitive though.
+#
 # Revision 1.40  2003/11/18 23:43:12  jalet
 # Mailto can be any external command now, as usual.
@@ -197,4 +202,11 @@
         self.config = ConfigParser.ConfigParser()
         self.config.read([self.filename])
+            
+    def isTrue(self, option) :        
+        """Returns 1 if option is set to true, else 0."""
+        if (option is not None) and (option.upper().strip() in ['Y', 'YES', '1', 'ON', 'T', 'TRUE']) :
+            return 1
+        else :    
+            return 0
                         
     def getPrinterNames(self) :    
@@ -439,23 +451,15 @@
     def getDebug(self) :          
         """Returns 1 if debugging is activated, else 0."""
-        debug = self.getGlobalOption("debug", ignore=1)
-        if (debug is not None) and (debug.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) :
-            return 1
-        else :    
-            return 0
+        return self.isTrue(self.getGlobalOption("debug", ignore=1))
             
     def getCaching(self) :          
         """Returns 1 if database caching is enabled, else 0."""
-        caching = self.getGlobalOption("storagecaching", ignore=1)
-        if (caching is not None) and (caching.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) :
-            return 1
-        else :    
-            return 0
+        return self.isTrue(self.getGlobalOption("storagecaching", ignore=1))
             
     def getDisableHistory(self) :          
         """Returns 1 if we want to disable history, else 0."""
-        disablehistory = self.getGlobalOption("disablehistory", ignore=1)
-        if (disablehistory is not None) and (disablehistory.upper().strip() in ['Y', 'YES', '1', 'ON', 'O']) :
-            return 1
-        else :    
-            return 0
+        return self.isTrue(self.getGlobalOption("disablehistory", ignore=1))
+            
+    def getUserNameToLower(self) :          
+        """Returns 1 if we want to convert usernames to lowercase when printing, else 0."""
+        return self.isTrue(self.getGlobalOption("utolower", ignore=1))
Index: /pykota/trunk/pykota/version.py
===================================================================
--- /pykota/trunk/pykota/version.py (revision 1226)
+++ /pykota/trunk/pykota/version.py (revision 1227)
@@ -22,5 +22,5 @@
 #
 
-__version__ = "1.16alpha15_unofficial"
+__version__ = "1.16alpha16_unofficial"
 
 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""
Index: /pykota/trunk/NEWS
===================================================================
--- /pykota/trunk/NEWS (revision 1226)
+++ /pykota/trunk/NEWS (revision 1227)
@@ -22,4 +22,9 @@
 PyKota NEWS :
 
+    - 1.16alpah16 :
+    
+        - Added utolower configuration option to convert all usernames
+          to lowercase during printing. 
+          
     - 1.15alpha15 :
     
