tenants: fix footer_links for moved config

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-22 15:48:17 +02:00
parent 19ae6585dc
commit 939889e0ec
3 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ class CurrentTenantSerializer(PassiveSerializer):
ui_footer_links = ListField(
child=FooterLinkSerializer(),
read_only=True,
default=CONFIG.y("authentik.footer_links"),
default=CONFIG.y("footer_links", []),
)
flow_unenrollment = CharField(source="flow_unenrollment.slug", required=False)

View File

@ -19,7 +19,7 @@ class TestTenants(TestCase):
"branding_favicon": "/static/dist/assets/icons/icon.png",
"branding_title": "authentik",
"matched_domain": "authentik-default",
"ui_footer_links": CONFIG.y("authentik.footer_links"),
"ui_footer_links": CONFIG.y("footer_links"),
},
)
@ -38,7 +38,7 @@ class TestTenants(TestCase):
"branding_favicon": "/static/dist/assets/icons/icon.png",
"branding_title": "custom",
"matched_domain": "bar.baz",
"ui_footer_links": CONFIG.y("authentik.footer_links"),
"ui_footer_links": CONFIG.y("footer_links"),
},
)
@ -52,6 +52,6 @@ class TestTenants(TestCase):
"branding_favicon": "/static/dist/assets/icons/icon.png",
"branding_title": "authentik",
"matched_domain": "fallback",
"ui_footer_links": CONFIG.y("authentik.footer_links"),
"ui_footer_links": CONFIG.y("footer_links"),
},
)

View File

@ -31,5 +31,5 @@ def context_processor(request: HttpRequest) -> dict[str, Any]:
return {
"tenant": tenant,
"ak_version": __version__,
"footer_links": CONFIG.y("authentik.footer_links"),
"footer_links": CONFIG.y("footer_links"),
}