mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
During app installs, set default answer for user-type args to main user
This commit is contained in:
parent
42bc8c354a
commit
49c4324ee1
1 changed files with 8 additions and 1 deletions
|
@ -2439,9 +2439,16 @@ def _parse_args_in_yunohost_format(args, action_args):
|
||||||
|
|
||||||
elif arg_type == 'user':
|
elif arg_type == 'user':
|
||||||
msignals.display(m18n.n('users_available'))
|
msignals.display(m18n.n('users_available'))
|
||||||
for user in user_list()['users'].keys():
|
users = user_list()['users']
|
||||||
|
for user in users.keys():
|
||||||
msignals.display("- {}".format(user))
|
msignals.display("- {}".format(user))
|
||||||
|
|
||||||
|
root_mail = "root@%s" % _get_maindomain()
|
||||||
|
for user in users.keys():
|
||||||
|
if root_mail in user_info(user)["mail-aliases"]:
|
||||||
|
arg_default = user
|
||||||
|
ask_string += ' (default: {0})'.format(arg_default)
|
||||||
|
|
||||||
elif arg_type == 'password':
|
elif arg_type == 'password':
|
||||||
msignals.display(m18n.n('good_practices_about_user_password'))
|
msignals.display(m18n.n('good_practices_about_user_password'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue