Skip to content

Commit

Permalink
Fix user interaction wording in user modify cli
Browse files Browse the repository at this point in the history
We don't only modify users with this command we also create them - fix all
accourences of "modify" to additionally state "create".
  • Loading branch information
JOJ0 committed Nov 16, 2023
1 parent 31f4b9f commit 35781a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synadm/cli/user.py
Expand Up @@ -491,7 +491,7 @@ def modify(ctx, helper, user_id, password, password_prompt, display_name,
password = None
sure = (
helper.no_confirm or
click.prompt("Are you sure you want to modify user? (y/N)",
click.prompt("Are you sure you want to modify/create user? (y/N)",
type=bool, default=False, show_default=False)
)
if sure:
Expand All @@ -506,12 +506,12 @@ def modify(ctx, helper, user_id, password, password_prompt, display_name,
'null' if user_type == 'regular' else user_type, lock
)
if modified is None:
click.echo("User could not be modified.")
click.echo("User could not be modified/created.")
raise SystemExit(1)
if helper.output_format == "human":
if modified != {}:
helper.output(modified)
click.echo("User successfully modified.")
click.echo("User successfully modified/created.")
else:
click.echo("Synapse returned: {}".format(modified))
else:
Expand Down

0 comments on commit 35781a2

Please sign in to comment.