Skip to content
Snippets Groups Projects
Commit efff48c4 authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story ac2. Removed unnecessary type casts.

parent adaeb6b8
No related branches found
No related tags found
No related merge requests found
...@@ -186,12 +186,12 @@ public abstract class LdapDAO ...@@ -186,12 +186,12 @@ public abstract class LdapDAO
} }
if (p instanceof NumericPrincipal) if (p instanceof NumericPrincipal)
{ {
ldapField = "(&(objectclass=cadcaccount)(numericid=" + p.getName() + "))"; ldapField = "(numericid=" + p.getName() + ")";
break; break;
} }
if (p instanceof X500Principal) if (p instanceof X500Principal)
{ {
ldapField = "(&(objectclass=cadcaccount)(distinguishedname=" + p.getName() + "))"; ldapField = "(distinguishedname=" + p.getName() + ")";
break; break;
} }
if (p instanceof OpenIdPrincipal) if (p instanceof OpenIdPrincipal)
......
...@@ -466,8 +466,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO ...@@ -466,8 +466,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
"Unsupported principal type " + userID.getClass()); "Unsupported principal type " + userID.getClass());
} }
searchField = "(&(objectclass=inetorgperson)(objectclass=cadcaccount)(" + searchField = "(" + searchField + "=" + userID.getName() + ")";
searchField + "=" + userID.getName() + "))";
logger.debug(searchField); logger.debug(searchField);
SearchResultEntry searchResult = null; SearchResultEntry searchResult = null;
......
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