mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
portal: improve domain setting fetch + set show_other_domains_apps to false by default ?
This commit is contained in:
parent
a4366e88fc
commit
a0dbf6a5b0
2 changed files with 13 additions and 12 deletions
|
@ -9,7 +9,7 @@ name = "Features"
|
||||||
|
|
||||||
[feature.portal.show_other_domains_apps]
|
[feature.portal.show_other_domains_apps]
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = 1
|
default = false
|
||||||
|
|
||||||
[feature.portal.portal_title]
|
[feature.portal.portal_title]
|
||||||
type = "string"
|
type = "string"
|
||||||
|
|
|
@ -59,18 +59,19 @@ def _get_portal_settings(domain: Union[str, None] = None):
|
||||||
|
|
||||||
domain = request.get_header("host")
|
domain = request.get_header("host")
|
||||||
|
|
||||||
if Path(f"{DOMAIN_SETTINGS_DIR}/{domain}.portal.yml").exists():
|
assert domain and "/" not in domain
|
||||||
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,
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
return settings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue