projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce84d61
)
[FIX] auth_ldap: avoid to try twice the authentication to the ldap server
author
Denis Ledoux
<dle@odoo.com>
Tue, 16 Sep 2014 16:33:42 +0000
(18:33 +0200)
committer
Denis Ledoux
<dle@odoo.com>
Tue, 16 Sep 2014 16:33:42 +0000
(18:33 +0200)
See #1982
addons/auth_ldap/users_ldap.py
patch
|
blob
|
history
diff --git
a/addons/auth_ldap/users_ldap.py
b/addons/auth_ldap/users_ldap.py
index
a09b683
..
e253874
100644
(file)
--- a/
addons/auth_ldap/users_ldap.py
+++ b/
addons/auth_ldap/users_ldap.py
@@
-251,6
+251,10
@@
class users(osv.osv):
return user_id
registry = RegistryManager.get(db)
with registry.cursor() as cr:
+ cr.execute("SELECT id, active FROM res_users WHERE lower(login)=%s", (login,))
+ res = cr.fetchone()
+ if res:
+ return False
ldap_obj = registry.get('res.company.ldap')
for conf in ldap_obj.get_ldap_dicts(cr):
entry = ldap_obj.authenticate(conf, login, password)