diff --git a/locales/en.json b/locales/en.json index 19213c372..45b3cdb1a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -404,6 +404,7 @@ "user_unknown": "Unknown user: {user:s}", "user_update_failed": "Unable to update user", "user_updated": "The user has been updated", + "users_available": "Available users:", "yunohost_already_installed": "YunoHost is already installed", "yunohost_ca_creation_failed": "Unable to create certificate authority", "yunohost_ca_creation_success": "The local certification authority has been created.", diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 7961591e7..97d04603a 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -2048,7 +2048,7 @@ def _parse_action_args_in_yunohost_format(args, action_args, auth=None): """ from yunohost.domain import (domain_list, _get_maindomain, domain_url_available, _normalize_domain_path) - from yunohost.user import user_info + from yunohost.user import user_info, user_list args_dict = OrderedDict() @@ -2094,6 +2094,11 @@ def _parse_action_args_in_yunohost_format(args, action_args, auth=None): for domain in domain_list(auth)['domains']: msignals.display("- {}".format(domain)) + if arg_type == 'user': + msignals.display(m18n.n('users_available')) + for user in user_list(auth)['users'].keys(): + msignals.display("- {}".format(user)) + try: input_string = msignals.prompt(ask_string, is_password) except NotImplementedError: