Changeset 3367 for pykota/trunk/bin
- Timestamp:
- 05/03/08 18:58:06 (16 years ago)
- Location:
- pykota/trunk/bin
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkbcodes
r3362 r3367 46 46 def main(self, names, options) : 47 47 """Manage billing codes.""" 48 if (not self.config.isAdmin) and (options.action != "list"):49 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))48 if options.action != "list" : 49 self.adminOnly() 50 50 51 51 islist = (options.action == "list") -
pykota/trunk/bin/pkinvoice
r3365 r3367 189 189 raise PyKotaToolError, "The Python Imaging Library is missing. Download it from http://www.pythonware.com/downloads" 190 190 191 if not self.config.isAdmin : 192 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 191 self.adminOnly() 193 192 194 193 self.pagesize = getPageSize(options.pagesize) -
pykota/trunk/bin/pkprinters
r3295 r3367 190 190 def main(self, names, options) : 191 191 """Manage printers.""" 192 if (not self.config.isAdmin) and (not options["list"]):193 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))192 if not options["list"] : 193 self.adminOnly() 194 194 195 195 docups = options["cups"] -
pykota/trunk/bin/pkrefund
r3360 r3367 183 183 raise PyKotaToolError, "The Python Imaging Library is missing. Download it from http://www.pythonware.com/downloads" 184 184 185 if not self.config.isAdmin : 186 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 185 self.adminOnly() 187 186 188 187 self.pagesize = getPageSize(options.pagesize) -
pykota/trunk/bin/pkturnkey
r3295 r3367 381 381 def main(self, names, options) : 382 382 """Intializes PyKota's database.""" 383 if not self.config.isAdmin : 384 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], \ 385 _("You're not allowed to use this command.")) 386 383 self.adminOnly() 384 387 385 if not names : 388 386 names = ["*"]