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 7ed39e9 commit 5123c64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synadm/cli/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,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 @@ -505,12 +505,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 5123c64

Please sign in to comment.