Changeset 1027

Show
Ignore:
Timestamp:
06/13/03 21:07:57 (21 years ago)
Author:
jalet
Message:

Two big bugs fixed, time to release something ;-)

Location:
pykota/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/conf/pykota.conf.sample

    r1025 r1027  
    4646# NB : storageuser and storageuserpw are not used anymore 
    4747 
    48 # LDAP example : 
     48# LDAP example (DOESN'T WORK YET) : 
    4949#storagebackend: ldapstorage 
    5050#storageserver: ldap://ldap.librelogiciel.com:389 
     
    146146# one section per printer, or no other section at all if all options  
    147147# are defined globally. 
    148 # The section's name must be the same as the printer's name as defined 
     148# Each section's name must be the same as the printer's name as defined 
    149149# in your printing system, be it CUPS or LPRng. 
     150# If you don't want any special printer section, just comment out 
     151# the line below so that following options are global. 
    150152[hpmarketing] 
    151153 
  • pykota/trunk/NEWS

    r1022 r1027  
    2222PyKota NEWS : 
    2323 
     24    - 1.08 : 
     25     
     26        - Major bug fix wrt LPRng support for remote jobs. 
     27         
     28        - Major bug fix wrt increase/decrease account balances. 
     29         
    2430    - 1.08alpha8 : 
    2531     
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1021 r1027  
    2121# 
    2222# $Log$ 
     23# Revision 1.6  2003/06/13 19:07:57  jalet 
     24# Two big bugs fixed, time to release something ;-) 
     25# 
    2326# Revision 1.5  2003/06/10 16:37:54  jalet 
    2427# Deletion of the second user which is not needed anymore. 
     
    134137             
    135138    def getJobHistoryId(self, jobid, userid, printerid) :         
    136         """Returns the history line's id given a (jobid, userid, printerid).""" 
     139        """Returns the history line's id given a (jobid, userid, printerid). 
     140         
     141           TODO : delete because shouldn't be needed by the LDAP backend 
     142        """ 
    137143        raise PyKotaStorageError, "Not implemented !" 
    138144             
     
    344350    def getPrinterPageCounter(self, printerid) : 
    345351        """Returns the last page counter value for a printer given its id, also returns last username, last jobid and history line id.""" 
    346         return # TODO 
    347         result = self.doSearch("objectClass=pykotaPrinterJob", ["pykotaJobHistoryId", "pykotaJobId", "uid", "pykotaPrinterPageCounter", "pykotaJobSize", "pykotaAction", "pykotaJobDate"], base=printerid) 
    348         if result : 
    349             pass # TODO 
     352        result = self.doSearch("objectClass=pykotaPrinter", ["pykotaPrinterName", "cn"], base=printerid, scope=ldap.SCOPE_BASE) 
     353        if result : 
     354            fields = result[0][1] 
     355            printername = (fields.get("pykotaPrinterName") or fields.get("cn"))[0] 
     356            result = self.doSearch("(&(objectClass=pykotaLastjob)(|(pykotaPrinterName=%s)(cn=%s)))" % (printername, printername), ["pykotaLastJobIdent"]) 
     357            if result : 
     358                lastjobident = result[0][1]["pykotaLastJobIdent"][0] 
     359                result = self.doSearch("(&(objectClass=pykotaJob)(cn=%s))" % lastjobident, ["pykotaUserName", "pykotaPrinterName", "pykotaJobId", "pykotaPrinterPageCounter", "pykotaJobSize", "pykotaAction", "createTimestamp"]) 
     360                if result : 
     361                    pass # TODO 
    350362         
    351363    def addUserToGroup(self, userid, groupid) :     
  • pykota/trunk/pykota/version.py

    r1021 r1027  
    2121# 
    2222 
    23 __version__ = "1.08alpha8_unofficial" 
     23__version__ = "1.08_unofficial" 
    2424 
    2525__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/README

    r1015 r1027  
    8484          used to limit the user printing instead of a print quota. 
    8585          Actually you can limit either by account balance OR by 
    86           print quota, but maybe both should be checked at the  
    87           same time. Tell me what you prefer. 
     86          print quota. Account balance is shared between printers 
     87          for an user, while quotas are define separately for 
     88          each printer the user prints on. 
    8889           
    8990All the command line tools accept the -h | --help command line option