Changeset 2761

Show
Ignore:
Timestamp:
02/27/06 23:16:00 (19 years ago)
Author:
jerome
Message:

Now limits group listing to the groups the current user is a member of.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r2760 r2761  
    180180            else : 
    181181                names = [ username ] 
    182                  
     182                if options["groups"] : 
     183                    user = self.storage.getUser(username) 
     184                    if user.Exists : 
     185                        names = [ g.Name for g in self.storage.getUserGroups(user) ] 
     186        elif not names :         
     187            names = ["*"] 
     188             
    183189        suffix = (options["groups"] and "Group") or "User"         
    184190        printernames = options["printer"].split(",") 
    185         if not names : 
    186             names = ["*"] 
    187191             
    188192        if not options["list"] :