Changeset 2760

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

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

Location:
pykota/trunk
Files:
2 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(",") 
  • pykota/trunk/NEWS

    r2759 r2760  
    2424    - 1.24alpha15 : 
    2525     
     26        - edpykota --list is now authorized to mere mortal users, but 
     27          restricts the list to the current user's information. 
     28         
    2629        - Extended the functionnality of the 'onbackenderror' directive to 
    2730          allow for configurable retries.