Show
Ignore:
Timestamp:
07/07/03 14:19:52 (21 years ago)
Author:
jalet
Message:

Now repykota and warnpykota --groups check the groups the user is a member of
in the print quota database, not in the system passwd/group files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/repykota

    r1048 r1071  
    2323# 
    2424# $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# 
    2529# Revision 1.40  2003/06/30 12:46:15  jalet 
    2630# Extracted reporting code. 
     
    238242            # not the root user 
    239243            # reports only the current user 
     244            username = pwd.getpwuid(uid)[0] 
    240245            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 = [ ] 
    242251            else : 
    243                 ugnames = [ pwd.getpwuid(uid)[0] ] 
     252                ugnames = [ username ] 
    244253         
    245254        printers = self.storage.getMatchingPrinters(options["printer"])