diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index bc71d6bf..fcd921a8 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -10,10 +10,7 @@ import os # dotenv import dotenv -import ldap - from django.utils.translation import ugettext_lazy as _ -from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion logger = logging.getLogger(__name__) @@ -741,8 +738,6 @@ LDAP_DEFAULT_START_UID = int(env('LDAP_DEFAULT_START_UID')) # Search union over OUs search_base = env('LDAPSEARCH').split() -search_base_ldap = [LDAPSearch(x, ldap.SCOPE_SUBTREE, "(uid=%(user)s)") for x in search_base] -AUTH_LDAP_USER_SEARCH = LDAPSearchUnion(*search_base_ldap) AUTH_LDAP_START_TLS = bool(os.environ.get('LDAP_USE_TLS', False)) ENTIRE_SEARCH_BASE = env("ENTIRE_SEARCH_BASE") diff --git a/requirements.txt b/requirements.txt index b77e4f51..5fb2ec67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -63,6 +63,7 @@ djangocms-text-ckeditor==2.9.3 djangocms-video==1.0.0 easy-thumbnails==2.3 html5lib==0.9999999 +ldap3==2.6.1 lxml==3.6.0 model-mommy==1.2.6 phonenumbers==7.4.0