properly detect settings.AUTHENTICATION_BACKEND changes for SSO logins

see: https://github.com/ansible/tower/issues/1979
This commit is contained in:
Ryan Petrello
2018-06-12 14:28:04 -04:00
parent 1733a20094
commit c3bda8e259
2 changed files with 21 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ from django.core.wsgi import WSGIHandler # NOQA
import django # NOQA
from django.conf import settings # NOQA
from django.urls import resolve # NOQA
import social_django # NOQA
"""
@@ -34,6 +35,11 @@ if MODE == 'production':
logger.error("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.")
raise Exception("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.")
if social_django.__version__ != '2.1.0':
raise RuntimeError("social_django version other than 2.1.0 detected {}. \
Confirm that per-request social_django.utils.BACKENDS override \
still works".format(social_django.__version__))
if django.__version__ != '1.11.11':
raise RuntimeError("Django version other than 1.11.11 detected {}. \