Skip to content
Browse files

Prepared support for ldap integration

  • Loading branch information...
1 parent cced7dd commit 4e7f7cd9f5217f62995b115cffdbc14c2c957a47 Cyril committed Dec 19, 2011
Showing with 12 additions and 1 deletion.
  1. +1 −0 requirements.pip
  2. +11 −1 settings.py
View
1 requirements.pip
@@ -20,3 +20,4 @@ simplejson
sphinx
johnny-cache
django-pandora
+-e hg+https://bitbucket.org/psagers/django-auth-ldap#egg=django-auth-ldap
@letoosh
letoosh added a note Jan 3, 2012

This requires mercurial to be installed, whereas no other module has such dependancy, so let's keep it out for now (or move to another branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
12 settings.py
@@ -8,6 +8,8 @@
"""
Django settings for treeio project.
"""
+import ldap
+from django_auth_ldap.config import LDAPSearch
from os import path
PROJECT_ROOT = path.abspath(path.dirname(__file__)) # assuming settings are in the same dir as source
@@ -157,11 +159,20 @@
AUTH_PROFILE_MODULE = 'core.User'
AUTHENTICATION_BACKENDS = (
+# 'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
'treeio.core.auth.HashBackend',
'treeio.core.auth.EmailBackend',
)
+# LDAP Configuration
+#AUTH_LDAP_SERVER_URI = 'ldap://'
+#AUTH_LDAP_BIND_DN = ""
+#AUTH_LDAP_BIND_PASSWORD = ""
+#AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
+# ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
+#AUTH_LDAP_START_TLS = True
+
#
# Hardtree configuration
#
@@ -451,4 +462,3 @@
# Dajaxice settings
DAJAXICE_MEDIA_PREFIX="dajaxice"
-

0 comments on commit 4e7f7cd

Please sign in to comment.
Something went wrong with that request. Please try again.