disable simple Django backend by default (#10069)

This commit is contained in:
Benjamin Dauvergne 2016-02-24 10:32:32 +01:00
parent 0f3ad316c4
commit e3c09e4971
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@ class AppSettings(object):
'ENABLED': True,
'CREATE_USER': True,
'REALM': None,
'DJANGO_BACKEND': False,
}
def __init__(self, prefix):

View File

@ -24,8 +24,9 @@ class A2KerberosBackend(KerberosBackend):
def authenticate(self, principal=None, **kwargs):
if not app_settings.ENABLED:
return
return super(A2KerberosBackend, self).authenticate(principal=principal,
**kwargs)
if not app_settings.DJANGO_BACKEND:
return
return super(A2KerberosBackend, self).authenticate(principal=principal, **kwargs)
def get_saml2_authn_context(self):
import lasso