Changeset 1969
- Timestamp:
- 12/02/04 23:27:11 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r1968 r1969 104 104 #printerbase: ou=Printers,ou=PyKota,dc=librelogiciel,dc=com 105 105 #printerrdn: cn 106 #userquotabase: ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com107 #groupquotabase: ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com108 106 #jobbase: ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com 109 107 #lastjobbase: ou=LastJobs,ou=PyKota,dc=librelogiciel,dc=com 108 109 # These two fields are special, they either accept a branch 110 # dn, like an ou for example, or the special keywords 'user' 111 # and 'group'. If 'user' or 'group' is used, the print quota 112 # entries will be created below the user or group entry itself, 113 # which will then be used like a branch (you can mix and match 114 # different values depending on what you want to do). 115 #userquotabase: user 116 #userquotabase: ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com 117 #groupquotabase: group 118 #groupquotabase: ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com 119 110 120 # 111 121 # How to create new accounts and groups -
pykota/trunk/NEWS
r1968 r1969 24 24 - 1.21alpha11 : 25 25 26 - Now user and group print quota entries can be stored directly 27 below the user or group with the LDAP backend, using them 28 as branches. Thanks to Stefan Wold for the patch. 29 See the sample configuration file for details. 30 26 31 - TLS is now supported with the LDAP backend. Thanks to Stefan 27 32 Wold for the patch. 33 See the sample configuration file for details. 28 34 29 35 - edpkota now accepts the -U | --used value command line argument -
pykota/trunk/pykota/storages/ldapstorage.py
r1968 r1969 22 22 # 23 23 # $Log$ 24 # Revision 1.89 2004/12/02 22:27:11 jalet 25 # Integrated and extended Stefan Wold's patch to store print quota entries 26 # directly below the user or the group object with the LDAP backend 27 # 24 28 # Revision 1.88 2004/12/02 22:01:58 jalet 25 29 # TLS is now supported with the LDAP backend … … 675 679 userpquota = StorageUserPQuota(self, user, printer) 676 680 if printer.Exists and user.Exists : 677 result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaUserName=%s)(pykotaPrinterName=%s))" % (user.Name, printer.Name), ["pykotaPageCounter", "pykotaLifePageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=self.info["userquotabase"]) 681 if self.info["userquotabase"].lower() == "user" : 682 result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaUserName=%s)(pykotaPrinterName=%s))" % (user.Name, printer.Name), ["pykotaPageCounter", "pykotaLifePageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=user.ident) 683 else : 684 result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaUserName=%s)(pykotaPrinterName=%s))" % (user.Name, printer.Name), ["pykotaPageCounter", "pykotaLifePageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=self.info["userquotabase"]) 678 685 if result : 679 686 fields = result[0][1] … … 706 713 grouppquota = StorageGroupPQuota(self, group, printer) 707 714 if group.Exists : 708 result = self.doSearch("(&(objectClass=pykotaGroupPQuota)(pykotaGroupName=%s)(pykotaPrinterName=%s))" % (group.Name, printer.Name), ["pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=self.info["groupquotabase"]) 715 if self.info["groupquotabase"].lower() == "group" : 716 result = self.doSearch("(&(objectClass=pykotaGroupPQuota)(pykotaGroupName=%s)(pykotaPrinterName=%s))" % (group.Name, printer.Name), ["pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=group.ident) 717 else : 718 result = self.doSearch("(&(objectClass=pykotaGroupPQuota)(pykotaGroupName=%s)(pykotaPrinterName=%s))" % (group.Name, printer.Name), ["pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=self.info["groupquotabase"]) 709 719 if result : 710 720 fields = result[0][1] … … 1028 1038 "pykotaLifePageCounter" : "0", 1029 1039 } 1030 dn = "cn=%s,%s" % (uuid, self.info["userquotabase"]) 1040 if self.info["userquotabase"].lower() == "user" : 1041 dn = "cn=%s,%s" % (uuid, user.ident) 1042 else : 1043 dn = "cn=%s,%s" % (uuid, self.info["userquotabase"]) 1031 1044 self.doAdd(dn, fields) 1032 1045 return self.getUserPQuota(user, printer) … … 1041 1054 "pykotaDateLimit" : "None", 1042 1055 } 1043 dn = "cn=%s,%s" % (uuid, self.info["groupquotabase"]) 1056 if self.info["groupquotabase"].lower() == "group" : 1057 dn = "cn=%s,%s" % (uuid, group.ident) 1058 else : 1059 dn = "cn=%s,%s" % (uuid, self.info["groupquotabase"]) 1044 1060 self.doAdd(dn, fields) 1045 1061 return self.getGroupPQuota(group, printer)