Show
Ignore:
Timestamp:
02/27/06 23:08:38 (18 years ago)
Author:
jerome
Message:

Allows normal users to use edpykota --list in a restricted way.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r2755 r2760  
    175175        """Edit user or group quotas.""" 
    176176        if not self.config.isAdmin : 
    177             raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 
    178          
     177            username = pwd.getpwuid(os.geteuid())[0] 
     178            if not options["list"] : 
     179                raise PyKotaCommandLineError, "%s : %s" % (username, _("You're not allowed to use this command.")) 
     180            else : 
     181                names = [ username ] 
     182                 
    179183        suffix = (options["groups"] and "Group") or "User"         
    180184        printernames = options["printer"].split(",")