diff --git a/share/config_domain.toml b/share/config_domain.toml index 1239b1fea..6fc5fc50a 100644 --- a/share/config_domain.toml +++ b/share/config_domain.toml @@ -9,7 +9,7 @@ name = "Features" [feature.portal.show_other_domains_apps] type = "boolean" - default = 1 + default = false [feature.portal.portal_title] type = "string" diff --git a/src/portal.py b/src/portal.py index cc6c03e4b..c7a0eb68b 100644 --- a/src/portal.py +++ b/src/portal.py @@ -59,18 +59,19 @@ def _get_portal_settings(domain: Union[str, None] = None): domain = request.get_header("host") - if Path(f"{DOMAIN_SETTINGS_DIR}/{domain}.portal.yml").exists(): - settings = read_yaml(f"{DOMAIN_SETTINGS_DIR}/{domain}.portal.yml") - else: - settings = { - "public": False, - "portal_logo": "", - "portal_theme": "system", - "portal_title": "YunoHost", - "show_other_domains_apps": 1, - } + assert domain and "/" not in domain - settings["domain"] = domain + settings = { + "public": False, + "portal_logo": "", + "portal_theme": "system", + "portal_title": "YunoHost", + "show_other_domains_apps": false, + "domain": domain, + } + + if Path(f"{DOMAIN_SETTINGS_DIR}/{domain}.portal.yml").exists(): + settings.update(read_yaml(f"{DOMAIN_SETTINGS_DIR}/{domain}.portal.yml")) return settings