Enterprise commands in batch mode
@@ -100,11 +100,7 @@ def do_command(params, command_line):
if cmd in commands:
command = commands[cmd]
else:
- if params.enterprise:
command = enterprise_commands[cmd]
- else:
- logging.error('This command is restricted to Keeper Enterprise administrators.')
- return
if command.is_authorised():
if not params.session_token:
@@ -117,6 +113,10 @@ def do_command(params, command_line):
logging.info('Canceled')
return
+ if cmd in enterprise_commands and not params.enterprise:
+ logging.error('This command is restricted to Keeper Enterprise administrators.')
+ return
+
params.event_queue.clear()
result = command.execute_args(params, args, command=orig_cmd)
if params.session_token:
