User LDAP populate does not work with Active Directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Therp Addons |
New
|
Undecided
|
Unassigned |
Bug Description
With Active Direcory, the LDAP filter is "sAMAccountName=%".
However, in the code this key is changed to lowercase, "samaccountname", so the lookup on the LDAP result disct can't match the "sAMAccountName" entry.
I got it fixed by removing the ".lower()" at model/users_
Traceback:
File "/opt/openerp/
cr, uid, {'ldap_id': ids[0]}, context=context)
File "/opt/openerp/
cr, uid, vals['ldap_id'], context=context)
File "/opt/openerp/
cr, uid, conf, result[
KeyError: u'samaccountname'
Debug:
-> cr, uid, conf, result[
(Pdb) p login_attr
u'samaccountname'
(Pdb) p result[
*** KeyError: KeyError(
(Pdb) p result[
'abelps'