Changeset 1071 for pykota/trunk/bin
- Timestamp:
- 07/07/03 14:19:52 (21 years ago)
- Location:
- pykota/trunk/bin
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/repykota
r1048 r1071 23 23 # 24 24 # $Log$ 25 # Revision 1.41 2003/07/07 12:19:52 jalet 26 # Now repykota and warnpykota --groups check the groups the user is a member of 27 # in the print quota database, not in the system passwd/group files 28 # 25 29 # Revision 1.40 2003/06/30 12:46:15 jalet 26 30 # Extracted reporting code. … … 238 242 # not the root user 239 243 # reports only the current user 244 username = pwd.getpwuid(uid)[0] 240 245 if options["groups"] : 241 ugnames = [ grp.getgrgid(pwd.getpwuid(uid)[3])[0] ] 246 user = self.storage.getUser(username) 247 if user.Exists : 248 ugnames = [ g.Name for g in self.storage.getUserGroups(user) ] 249 else : 250 ugnames = [ ] 242 251 else : 243 ugnames = [ pwd.getpwuid(uid)[0]]252 ugnames = [ username ] 244 253 245 254 printers = self.storage.getMatchingPrinters(options["printer"]) -
pykota/trunk/bin/warnpykota
r1041 r1071 23 23 # 24 24 # $Log$ 25 # Revision 1.21 2003/07/07 12:19:52 jalet 26 # Now repykota and warnpykota --groups check the groups the user is a member of 27 # in the print quota database, not in the system passwd/group files 28 # 25 29 # Revision 1.20 2003/06/25 14:10:01 jalet 26 30 # Hey, it may work (edpykota --reset excepted) ! … … 173 177 # protects other users from mail bombing if they are 174 178 # over quota. 179 username = pwd.getpwuid(uid)[0] 175 180 if options["groups"] : 176 ugnames = [ grp.getgrgid(pwd.getpwuid(uid)[3])[0] ] 181 user = self.storage.getUser(username) 182 if user.Exists : 183 ugnames = [ g.Name for g in self.storage.getUserGroups(user) ] 184 else : 185 ugnames = [ ] 177 186 else : 178 ugnames = [ pwd.getpwuid(uid)[0]]187 ugnames = [ username ] 179 188 180 189 printers = self.storage.getMatchingPrinters(options["printer"])