summaryrefslogtreecommitdiff
path: root/sublab_project
diff options
context:
space:
mode:
Diffstat (limited to 'sublab_project')
-rw-r--r--sublab_project/settings.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/sublab_project/settings.py b/sublab_project/settings.py
index b748f3e..d35e5c7 100644
--- a/sublab_project/settings.py
+++ b/sublab_project/settings.py
@@ -1,6 +1,10 @@
# Django settings for sublab_project project.
import os
+# from django_auth_ldap.config import LDAPSearch
+# import ldap
+
+
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
@@ -166,6 +170,25 @@ LOGGING = {
}
}
+# AUTH_LDAP_SERVER_URI = 'ldap://taifun.local.sublab.org'
+# AUTH_LDAP_BIND_DN = 'cn=djangotest,ou=users,dc=sublab,dc=org'
+# AUTH_LDAP_BIND_PASSWORD = 'djangotest'
+# AUTH_LDAP_USER_SEARCH = LDAPSearch('ou=users,dc=sublab,dc=org',
+# ldap.SCOPE_SUBTREE, '(uid=%(user)s)')
+AUTH_LDAP_USER_DN_TEMPLATE = 'uid=%(user)s,ou=users,dc=sublab,dc=org'
+AUTH_LDAP_USER_ATTR_MAP = {
+ 'first_name': 'givenName',
+ 'last_name': 'sn',
+ 'email': 'mail'
+}
+AUTH_LDAP_ALWAYS_UPDATE_USER = True
+AUTH_LDAP_START_TLS = True
+
+AUTHENTICATION_BACKENDS = (
+ 'django_auth_ldap.backend.LDAPBackend',
+ 'django.contrib.auth.backends.ModelBackend',
+)
+
try:
from local_settings import *
except ImportError: