Fixup cn attribute for ldap to be according to spec
This commit is contained in:
+2
-1
@@ -40,10 +40,11 @@ function removePrivateFields(ldapConfig) {
|
||||
function translateUser(ldapConfig, ldapUser) {
|
||||
assert.strictEqual(typeof ldapConfig, 'object');
|
||||
|
||||
// RFC: https://datatracker.ietf.org/doc/html/rfc2798
|
||||
return {
|
||||
username: ldapUser[ldapConfig.usernameField],
|
||||
email: ldapUser.mail || ldapUser.mailPrimaryAddress,
|
||||
displayName: ldapUser.cn // user.giveName + ' ' + user.sn
|
||||
displayName: ldapUser.displayName || ldapUser.cn // user.giveName + ' ' + user.sn
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user