﻿id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
11361	name_attr ldap field is not being caught properly	Estopero	branson	"First of all thanks for the plufin, is being very usefull for us :)

I think some custom fields are not being caught properly, we are using openLDAP and these are our three fields for user, name and email:

{{{
[account-manager]
user_attr = uid
name_attr = cn
email_attr = mail
}}}

The user_attr is rightly mapped, and I think the email_attr field works because is similar to the ActiveDirectory one, however the name_attr is not being defined and is empty in the user list panel.

I think the problem is that the ""displayName"" is hardcoded in the attr list


{{{
auth.py: line 121
def check_password(self, user, password):
...
attrs = [ self.user_attr, 'mail', 'proxyAddress', 'displayName']
...
userinfo = self._get_userinfo(users[0][1])
}}}
http://trac-hacks.org/browser/directoryauthplugin/trunk/tracext/dirauth/auth.py#L121

And in the _get_userinfo function you are looking for a attr field that will never exist if is not called ""displayName"":


{{{
auth.py: line 294
def _get_userinfo(self, attrs):
...
displayname = attrs.get(self.name_attr, [''])[0]
}}}
http://trac-hacks.org/browser/directoryauthplugin/trunk/tracext/dirauth/auth.py#L294

I'm not a python developer so I'm not sure if this is being the problem but could be. What do you think? :)

Thanks and great work"	defect	new	normal	DirectoryAuthPlugin	normal		ldap, custom fields		1.0
