Ldap enhancements#970
Open
dbenesj wants to merge 3 commits into
Open
Conversation
Regular users are not in general allowed to do that. Instead retrieve just the node of the user that is trying to log in, which is generally allowed.
…e configured for display name
patrickCIB
requested changes
May 11, 2026
| if (result.getAttributes().get(ldapDisplayNameAttribute) != null) { | ||
| user.setDisplayName(result.getAttributes().get(ldapDisplayNameAttribute).get().toString()); | ||
| } else { | ||
| log.debug("User " + login.getUsername() + " does not have attribute " + ldapDisplayNameAttribute + " defined."); |
Member
There was a problem hiding this comment.
Suggested change
| log.debug("User " + login.getUsername() + " does not have attribute " + ldapDisplayNameAttribute + " defined."); | |
| user.setDisplayName(user.getUserID()); | |
| log.debug("User " + login.getUsername() + " does not have attribute " + ldapDisplayNameAttribute + " defined."); |
Author
There was a problem hiding this comment.
wouldn't that be a duplication of the logic that is already in CIBUser.getDisplayName()?
@Override
public String getDisplayName() {
if((displayName != null)&&(!displayName.isEmpty())) return displayName;
else return userID;
}personaly I would prefer to not be setting the display name and leave that logic only in CIBUser.getDisplayName(), but no strong opinion 😉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhancement and fixes for LdapUserProvider:
This way it makes the LdapUserProvider usable in more environments.