Changeset 1179
- Timestamp:
- 11/12/03 14:06:38 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r1156 r1179 24 24 # 25 25 # $Log$ 26 # Revision 1.61 2003/11/12 13:06:35 jalet 27 # Bug fix wrt no user/group name command line argument to edpykota 28 # 26 29 # Revision 1.60 2003/10/09 21:25:24 jalet 27 30 # Multiple printer names or wildcards can be passed on the command line … … 448 451 raise PyKotaToolError, _("There's no printer matching %s") % pname 449 452 if not names : 450 if options["add"] and not printeradded : 451 raise PyKotaToolError, _("You have to pass user or group names on the command line") 453 if options["add"] : 454 if not printeradded : 455 raise PyKotaToolError, _("You have to pass user or group names on the command line") 456 else : 457 names = getattr(self.storage, "getAll%ssNames" % suffix)() 452 458 else : 453 459 names = [ "*" ] # all users -
pykota/trunk/NEWS
r1178 r1179 22 22 PyKota NEWS : 23 23 24 - 1.16alpha6 : 25 26 - Bug fixed : when edpykota was used to add a printer 27 with no user or group name, a bad user/group name "*" was 28 added to the database. 29 24 30 - 1.16alpha5 : 25 31 -
pykota/trunk/pykota/storages/ldapstorage.py
r1170 r1179 22 22 # 23 23 # $Log$ 24 # Revision 1.35 2003/11/12 13:06:37 jalet 25 # Bug fix wrt no user/group name command line argument to edpykota 26 # 24 27 # Revision 1.34 2003/10/24 08:37:55 jalet 25 28 # More complete messages in case of LDAP failure. … … 244 247 return dn 245 248 249 def getAllUsersNames(self) : 250 """Extracts all user names.""" 251 usernames = [] 252 result = self.doSearch("objectClass=pykotaAccount", ["pykotaUserName"], base=self.info["userbase"]) 253 if result : 254 usernames = [record[1]["pykotaUserName"][0] for record in result] 255 return usernames 256 257 def getAllGroupsNames(self) : 258 """Extracts all group names.""" 259 groupnames = [] 260 result = self.doSearch("objectClass=pykotaGroup", ["pykotaGroupName"], base=self.info["groupbase"]) 261 if result : 262 groupnames = [record[1]["pykotaGroupName"][0] for record in result] 263 return groupnames 264 246 265 def getUserFromBackend(self, username) : 247 266 """Extracts user information given its name.""" -
pykota/trunk/pykota/storages/pgstorage.py
r1156 r1179 22 22 # 23 23 # $Log$ 24 # Revision 1.21 2003/11/12 13:06:38 jalet 25 # Bug fix wrt no user/group name command line argument to edpykota 26 # 24 27 # Revision 1.20 2003/10/09 21:25:26 jalet 25 28 # Multiple printer names or wildcards can be passed on the command line … … 178 181 typ = "text" 179 182 return pg._quote(field, typ) 183 184 def getAllUsersNames(self) : 185 """Extracts all user names.""" 186 usernames = [] 187 result = self.doSearch("SELECT username FROM users;") 188 if result : 189 usernames = [record["username"] for record in result] 190 return usernames 191 192 def getAllGroupsNames(self) : 193 """Extracts all group names.""" 194 groupnames = [] 195 result = self.doSearch("SELECT groupname FROM groups;") 196 if result : 197 groupnames = [record["groupname"] for record in result] 198 return groupnames 180 199 181 200 def getUserFromBackend(self, username) : -
pykota/trunk/pykota/version.py
r1178 r1179 22 22 # 23 23 24 __version__ = "1.16alpha 5_unofficial"24 __version__ = "1.16alpha6_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""