From c3e750a97af3919aa8f0222f0ab2326272a55778 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 11 Dec 2020 16:29:10 +0100 Subject: [PATCH] add all_users in protected_urls --- src/yunohost/utils/legacy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yunohost/utils/legacy.py b/src/yunohost/utils/legacy.py index b8b44135d..1cc0246f3 100644 --- a/src/yunohost/utils/legacy.py +++ b/src/yunohost/utils/legacy.py @@ -235,6 +235,8 @@ def translate_legacy_rules_in_ssowant_conf_json_persistent(): protected_urls = persistent.get("protected_urls", []) + ["re:" + r for r in persistent.get("protected_regex", [])] unprotected_urls = persistent.get("unprotected_urls", []) + ["re:" + r for r in persistent.get("unprotected_regex", [])] + known_users = user_list()["users"].keys() + for legacy_rule in legacy_rules: if legacy_rule in persistent: del persistent[legacy_rule] @@ -261,7 +263,7 @@ def translate_legacy_rules_in_ssowant_conf_json_persistent(): if protected_urls: persistent["permissions"]['custom_protected'] = { - "users": [], + "users": known_users, "label": "Custom permissions - protected", "show_tile": False, "auth_header": True,