mirror of https://github.com/status-im/cabot.git
Merge pull request #384 from arachnys/var-handling-for-AUTH_LDAP
Use booleans for AUTH_LDAP setting
This commit is contained in:
commit
689449f866
|
@ -246,9 +246,10 @@ REST_FRAMEWORK = {
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
'django.contrib.auth.backends.ModelBackend',
|
'django.contrib.auth.backends.ModelBackend',
|
||||||
)
|
)
|
||||||
AUTH_LDAP = os.environ.get('AUTH_LDAP', 'false')
|
|
||||||
|
|
||||||
if AUTH_LDAP.lower() == "true":
|
AUTH_LDAP = os.environ.get('AUTH_LDAP', False)
|
||||||
|
|
||||||
|
if AUTH_LDAP:
|
||||||
from settings_ldap import *
|
from settings_ldap import *
|
||||||
AUTHENTICATION_BACKENDS += tuple(['django_auth_ldap.backend.LDAPBackend'])
|
AUTHENTICATION_BACKENDS += tuple(['django_auth_ldap.backend.LDAPBackend'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue