1
0

Added ANOTHER check for saml being enabled before loading it

This commit is contained in:
Azrenbeth
2021-08-25 11:22:04 +01:00
parent 08d386a37a
commit e7d6c061e4

View File

@@ -376,7 +376,10 @@ async def start(hs: "HomeServer"):
# 'module_has_registered' is true if a module calls 'register_saml2_user_mapping_provider_callbacks'
# Only one mapping provider can be set, so only load default (or legacy configured one) if this is
# still false
if not hs.get_saml2_user_mapping_provider().module_has_registered:
if (
hs.config.saml2.saml2_enabled
and not hs.get_saml2_user_mapping_provider().module_has_registered
):
load_default_or_legacy_saml2_mapping_provider(hs)
# If we've configured an expiry time for caches, start the background job now.