From 1da7d5f2cb7787d73688413805ff31b356de0756 Mon Sep 17 00:00:00 2001 From: Jean-Fred Berthelot Date: Thu, 6 Oct 2016 15:13:05 +0100 Subject: [PATCH] Use booleans for AUTH_LDAP setting --- cabot/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cabot/settings.py b/cabot/settings.py index c3b6406..932aa2d 100644 --- a/cabot/settings.py +++ b/cabot/settings.py @@ -246,9 +246,10 @@ REST_FRAMEWORK = { AUTHENTICATION_BACKENDS = ( '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 * AUTHENTICATION_BACKENDS += tuple(['django_auth_ldap.backend.LDAPBackend'])