Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

LDAP displayName attribute - Modify logic if it has a value

Brian Billman July 18, 2012

Using LDAP user directory, with Copy User on Login enabled.

Our LDAP schema has a value for displayName only if the user has a "nickname" set, and if it is set, it only has the nickname (which excludes lastname, example: William -> Will). But most users don't have that set at all, and it appears that JIRA is then creating a displayName based on firstName + lastName. If it possible to change this behavior (via a plugin?) so that if displayName is not empty, to always concatenate the lastName to it, and if it is empty, to leave the default behavior?

I realize the "best" fix would be to add a new LDAP attribute that had "(nickName Or firstName) lastName", but that may not be possible, so I'm seeing if there's another option.

Thanks!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Brian Billman January 27, 2013

I don't see any option other than creating a plugin to handle it. I tried modifying the DB directly (via a trigger), but the application doesn't reread the value (and it ends up getting overwritten the next time the user logs in).

0 votes
Brian Billman February 3, 2013

I don't see any option other than creating a plugin to handle it. I tried modifying the DB directly (via a trigger), but the application doesn't reread the value (and it ends up getting overwritten the next time the user logs in).

0 votes
marceloraveli January 9, 2013

You can resolve this problem altering the displayName attribute on LDAP.

First you need create a .ldif file with this sequence of commands:

dn: uid=Willian,ou=People,dc=your_company,dc=com
changetype: modify
delete: displayName

after, you need execute the following command as admin ldap:

ldapmodify -D "cn=root,dc=your_company,dc=com" -h localhost -f file.ldif -W -x

now you need modify the .ldif file this way:

dn: uid=marcelo,ou=People,dc=duxus,dc=com
changetype: modify
add: displayName
displayName: William Walker

after modify, you need execute the following command as admin ldap again:

ldapmodify -D "cn=root,dc=your_company,dc=com" -h localhost -f file.ldif -W -x

Done this, you should resolve your problem.

Brian Billman January 14, 2013

Modifying LDAP is not an option, which is why I am asking for other options (but I agree, it would be the best and easiest way to fix). I started looking into creating a plugin that will tie JIRA into our SSO system (it seems likely the displayname would be updated there), but haven't had much time to work on it (and the documentation isn't super clear, a full example would help tremendously).

TAGS
AUG Leaders

Atlassian Community Events