mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #506 from YunoHost/list_available_users_on_app_install
[enh] list available users on app installation user argument
This commit is contained in:
commit
75b7a481a0
2 changed files with 7 additions and 1 deletions
|
@ -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.",
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue