From 5dd237b64c09c83df078cc423411546eb2535bc1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 9 Jan 2023 23:58:45 +0100 Subject: [PATCH] ssowat: add use_remote_user_var_in_nginx_conf flag on permission --- src/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.py b/src/app.py index fd70e883e..f8eb75e6e 100644 --- a/src/app.py +++ b/src/app.py @@ -1343,6 +1343,8 @@ def app_ssowatconf(): } redirected_urls = {} + apps_using_remote_user_var_in_nginx = check_output('grep -nri \'$remote_user\' /etc/yunohost/apps/*/conf/*nginx*conf | awk -F/ \'{print $5}\' || true').strip().split("\n") + for app in _installed_apps(): app_settings = read_yaml(APPS_SETTING_PATH + app + "/settings.yml") or {} @@ -1381,7 +1383,10 @@ def app_ssowatconf(): if not uris: continue + app_id = perm_name.split(".")[0] + permissions[perm_name] = { + "use_remote_user_var_in_nginx_conf": app_id in apps_using_remote_user_var_in_nginx, "users": perm_info["corresponding_users"], "label": perm_info["label"], "show_tile": perm_info["show_tile"]