Changeset 1821 for pykota/trunk
- Timestamp:
- 10/13/04 23:40:10 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkprinters
r1803 r1821 24 24 # 25 25 # $Log$ 26 # Revision 1.17 2004/10/13 21:40:10 jalet 27 # Now mandates that the user be a PyKota administrator to allow dangerous 28 # command line options. --list is still allowed to mere mortals though. 29 # 26 30 # Revision 1.16 2004/10/11 22:53:05 jalet 27 31 # Postponed string interpolation to help message's output method … … 78 82 # 79 83 84 import os 80 85 import sys 86 import pwd 81 87 82 88 from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_ … … 180 186 def main(self, names, options) : 181 187 """Manage printers.""" 188 if (not self.config.isAdmin) and (not options["list"]) : 189 raise PyKotaToolError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 190 182 191 if options["list"] and not names : 183 192 names = ["*"] -
pykota/trunk/NEWS
r1814 r1821 24 24 - 1.20alpha25 : 25 25 26 - pkprinters allows --list to normal users, but require user 27 to be a PyKota administrator when another command line 28 option is used. 29 26 30 - pkhint doesn't use absolute path to search for helper commands 27 31 anymore.