Skip to content
Snippets Groups Projects
Commit 58e66cf7 authored by srosse's avatar srosse
Browse files

OO-4794: authorize login and uid to change LDAP user name

parent 2914b7f0
No related branches found
No related tags found
No related merge requests found
...@@ -175,6 +175,9 @@ public class LDAPLoginManagerImpl implements LDAPLoginManager, AuthenticationPro ...@@ -175,6 +175,9 @@ public class LDAPLoginManagerImpl implements LDAPLoginManager, AuthenticationPro
LdapContext ctx = bindSystem(); LdapContext ctx = bindSystem();
if(ctx != null) { if(ctx != null) {
String userDN = ldapDao.searchUserForLogin(name, ctx); String userDN = ldapDao.searchUserForLogin(name, ctx);
if(userDN == null) {
userDN = ldapDao.searchUserDNByUid(name, ctx);
}
if(StringHelper.containsNonWhitespace(userDN)) { if(StringHelper.containsNonWhitespace(userDN)) {
Authentication currentAuth = authenticationDao.getAuthentication(name, LDAPAuthenticationController.PROVIDER_LDAP); Authentication currentAuth = authenticationDao.getAuthentication(name, LDAPAuthenticationController.PROVIDER_LDAP);
if(currentAuth == null || currentAuth.getIdentity().equals(identity)) { if(currentAuth == null || currentAuth.getIdentity().equals(identity)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment