cleanup, ldap3 added to requirements.txt

This commit is contained in:
ahmadbilalkhalid 2019-12-12 22:19:10 +05:00
parent 49453cacd4
commit 37a3d21e0c
2 changed files with 1 additions and 5 deletions

View file

@ -10,10 +10,7 @@ import os
# dotenv # dotenv
import dotenv import dotenv
import ldap
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -741,8 +738,6 @@ LDAP_DEFAULT_START_UID = int(env('LDAP_DEFAULT_START_UID'))
# Search union over OUs # Search union over OUs
search_base = env('LDAPSEARCH').split() 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)) AUTH_LDAP_START_TLS = bool(os.environ.get('LDAP_USE_TLS', False))
ENTIRE_SEARCH_BASE = env("ENTIRE_SEARCH_BASE") ENTIRE_SEARCH_BASE = env("ENTIRE_SEARCH_BASE")

View file

@ -63,6 +63,7 @@ djangocms-text-ckeditor==2.9.3
djangocms-video==1.0.0 djangocms-video==1.0.0
easy-thumbnails==2.3 easy-thumbnails==2.3
html5lib==0.9999999 html5lib==0.9999999
ldap3==2.6.1
lxml==3.6.0 lxml==3.6.0
model-mommy==1.2.6 model-mommy==1.2.6
phonenumbers==7.4.0 phonenumbers==7.4.0