Show
Ignore:
Timestamp:
02/20/06 22:12:24 (18 years ago)
Author:
jerome
Message:

Added deletion methods for user and group print quota entries.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2707 r2717  
    14051405                self.doDelete(group.ident) 
    14061406                 
     1407    def deleteUserPQuota(self, upquota) :     
     1408        """Completely deletes an user print quota entry from the database.""" 
     1409        uname = self.userCharsetToDatabase(upquota.User.Name) 
     1410        pname = self.userCharsetToDatabase(upquota.Printer.Name) 
     1411        result = self.doSearch("(&(objectClass=pykotaJob)(pykotaUserName=%s)(pykotaPrinterName=%s))" \ 
     1412                                   % (uname, pname), \ 
     1413                                   base=self.info["jobbase"]) 
     1414        for (ident, fields) in result : 
     1415            self.doDelete(ident) 
     1416        self.doDelete(upquota.ident) 
     1417         
     1418    def deleteGroupPQuota(self, gpquota) :     
     1419        """Completely deletes a group print quota entry from the database.""" 
     1420        self.doDelete(gpquota.ident) 
     1421                 
    14071422    def deletePrinter(self, printer) :     
    14081423        """Completely deletes a printer from the Quota Storage."""