mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #982 from YunoHost/default-value-for-user-args
During app installs, set default answer for user-type args to main user
This commit is contained in:
commit
9b396693cf
1 changed files with 8 additions and 1 deletions
|
@ -2478,9 +2478,16 @@ def _parse_args_in_yunohost_format(user_answers, argument_questions):
|
|||
|
||||
elif question_type == 'user':
|
||||
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))
|
||||
|
||||
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 question_type == 'password':
|
||||
msignals.display(m18n.n('good_practices_about_user_password'))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue