From 501c5292ab7af825a738901dfabfd2ce1e55924a Mon Sep 17 00:00:00 2001 From: Maysara A Date: Mon, 24 Jul 2017 21:08:25 -0400 Subject: [PATCH] binding with user credentials instead of preset LDAP user/pass --- app/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index 9aee967..c9fcfc2 100644 --- a/app/models.py +++ b/app/models.py @@ -148,7 +148,8 @@ class User(db.Model): l.set_option( ldap.OPT_DEBUG_LEVEL, 255 ) l.protocol_version = ldap.VERSION3 - l.simple_bind_s(LDAP_USERNAME, LDAP_PASSWORD) + #l.simple_bind_s(LDAP_USERNAME, LDAP_PASSWORD) + l.simple_bind_s(self.username,self.password) ldap_result_id = l.search(baseDN, searchScope, searchFilter, retrieveAttributes) result_set = [] while 1: