Mercurial > kallithea
changeset 1287:28060f0ac6c6 beta
Fetch entry after successful bind for being able to read its attributes.
author | "Lorenzo M. Catucci" <lorenzo@sancho.ccd.uniroma2.it> |
---|---|
date | Tue, 26 Apr 2011 14:02:18 +0200 |
parents | c93234e9ac36 |
children | a781d315191c |
files | rhodecode/lib/auth_ldap.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/auth_ldap.py Wed Apr 13 00:39:15 2011 +0200 +++ b/rhodecode/lib/auth_ldap.py Tue Apr 26 14:02:18 2011 +0200 @@ -105,9 +105,10 @@ if not lobjects: raise ldap.NO_SUCH_OBJECT() - for (dn, attrs) in lobjects: + for (dn, _attrs) in lobjects: try: server.simple_bind_s(dn, password) + attrs = server.search_ext_s(dn, ldap.SCOPE_BASE, '(objectClass=*)')[0][1] break except ldap.INVALID_CREDENTIALS, e: