Changeset 2762 for pykota/trunk/bin/pkusers
- Timestamp:
- 02/27/06 23:28:01 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkusers
r2757 r2762 160 160 def main(self, names, options) : 161 161 """Manage users or groups.""" 162 if not self.config.isAdmin : 163 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 164 162 names = self.sanitizeNames(options, names) 165 163 suffix = (options["groups"] and "Group") or "User" 166 164 … … 230 228 self.display("\r100.00%%\r \r%s\n" % _("Done.")) 231 229 else : 232 if not names :233 names = ["*"]234 230 entries = getattr(self.storage, "getMatching%ss" % suffix)(",".join(names)) 235 231 if not entries : … … 407 403 elif options["remove"] and not options["ingroups"] : 408 404 raise PyKotaCommandLineError, _("You have to pass user groups names on the command line") 409 elif (not args) and options["add"]:405 elif (not args) and (options["add"] or options["delete"]) : 410 406 raise PyKotaCommandLineError, _("You have to pass user or group names on the command line") 411 407 else :