Show
Ignore:
Timestamp:
02/21/06 16:43:18 (18 years ago)
Author:
jerome
Message:

Completely untested modification stuff...

Files:
1 modified

Legend:

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

    r2726 r2735  
    11141114        return self.doModify(userpquota.ident, fields)          
    11151115         
    1116     def writeUserPQuotaPagesCounters(self, userpquota, newpagecounter, newlifepagecounter) :     
    1117         """Sets the new page counters permanently for a user print quota.""" 
    1118         fields = { 
    1119                    "pykotaPageCounter" : str(newpagecounter), 
    1120                    "pykotaLifePageCounter" : str(newlifepagecounter), 
    1121                    "pykotaDateLimit" : None, 
    1122                    "pykotaWarnCount" : "0", 
    1123                  }   
    1124         return self.doModify(userpquota.ident, fields)          
    1125         
    11261116    def decreaseUserAccountBalance(self, user, amount) :     
    11271117        """Decreases user's account balance from an amount.""" 
     
    12081198            self.doAdd(lastjdn, fields)           
    12091199             
    1210     def writeUserPQuotaLimits(self, userpquota, softlimit, hardlimit) : 
    1211         """Sets soft and hard limits for a user quota.""" 
     1200    def saveUserPQuota(self, userpquota) : 
     1201        """Saves an user print quota entry.""" 
    12121202        fields = {  
    1213                    "pykotaSoftLimit" : str(softlimit), 
    1214                    "pykotaHardLimit" : str(hardlimit), 
    1215                    "pykotaDateLimit" : "None", 
    1216                    "pykotaWarnCount" : "0", 
     1203                   "pykotaSoftLimit" : str(userpquota.SoftLimit), 
     1204                   "pykotaHardLimit" : str(userpquota.HardLimit), 
     1205                   "pykotaDateLimit" : str(userpquota.DateLimit), 
     1206                   "pykotaWarnCount" : str(userpquota.WarnCount), 
     1207                   "pykotaPageCounter" : str(userpquota.PageCounter), 
     1208                   "pykotaLifePageCounter" : str(userpquota.LifePageCounter), 
    12171209                 } 
    12181210        self.doModify(userpquota.ident, fields) 
     
    12321224        return self.doModify(userpquota.ident, fields)          
    12331225         
    1234     def writeGroupPQuotaLimits(self, grouppquota, softlimit, hardlimit) : 
    1235         """Sets soft and hard limits for a group quota on a specific printer.""" 
     1226    def saveGroupPQuota(self, grouppquota) : 
     1227        """Saves a group print quota entry.""" 
    12361228        fields = {  
    1237                    "pykotaSoftLimit" : str(softlimit), 
    1238                    "pykotaHardLimit" : str(hardlimit), 
    1239                    "pykotaDateLimit" : "None", 
     1229                   "pykotaSoftLimit" : str(grouppquota.SoftLimit), 
     1230                   "pykotaHardLimit" : str(grouppquota.HardLimit), 
     1231                   "pykotaDateLimit" : str(grouppquota.DateLimit), 
    12401232                 } 
    12411233        self.doModify(grouppquota.ident, fields)