From cf70ee887b9f671d722727ccd375259ff3498f3c Mon Sep 17 00:00:00 2001 From: Art Lukyanchyk <artiom.lukyanchyk@hs-hannover.de> Date: Fri, 22 Sep 2017 16:02:26 +0200 Subject: [PATCH] Fix the previous commit. --- ssoauth/app_settings/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssoauth/app_settings/__init__.py b/ssoauth/app_settings/__init__.py index 1b75682..61836c1 100644 --- a/ssoauth/app_settings/__init__.py +++ b/ssoauth/app_settings/__init__.py @@ -18,8 +18,9 @@ for setting_name in [k for k in globals().keys() if k.isupper()]: # checks SSO_DISABLED = SSO_DISABLED or getattr(conf.settings, "IDP_IGNORE", False) # legacy config -if not SSO_DISABLED: - assert not conf.settings.DEBUG, "Not ignoring IDP on production." +if SSO_DISABLED: + assert conf.settings.DEBUG, "Not ignoring IDP on production." +else: assert SP_HOST and SP_PORT, "Need SP_HOST and SP_PORT configured in settings." assert not SP_HOST.lower().startswith(("http:", "https:",)), "Need host name without protocol and port." -- GitLab