YunoHost / issues

General issue tracker for the YunoHost project
72 stars 8 forks source link

Default admin on app install #2153

Open zamentur opened 1 year ago

zamentur commented 1 year ago

When we install an app that need an admin, we sometimes have just one user OR we have only one admin listed in admins group. In this case, it could be useful to prefill this question with this user (and let the instance admin change the answer if needed).

Example of what's happened currently

root@ynh:/ynh-dev# yunohost app install grafana
[...]
Choose an administrator user for this app [toto]:
Error: Argument 'admin' is required

And what it could be:

root@ynh:/ynh-dev# yunohost app install grafana
[...]
Choose an administrator user for this app [toto]: toto <- prefilled answer

It might be managed here (i am not sure): https://github.com/YunoHost/yunohost/blob/069b782f07838ff42e96361620700bc7749ee15d/src/utils/config.py#L1319

alexAubin commented 1 year ago

Yup in fact there's a FIXME a few lines below: https://github.com/YunoHost/yunohost/blob/069b782f07838ff42e96361620700bc7749ee15d/src/utils/config.py#L1343