Commit c0599ed9 authored by Brian Major's avatar Brian Major
Browse files

s1890 - merged in nsAccountLock ticket

parents f247cac5 6405cb34
...@@ -520,7 +520,9 @@ public class LdapUserDAO extends LdapDAO ...@@ -520,7 +520,9 @@ public class LdapUserDAO extends LdapDAO
{ {
name = userID.getName(); name = userID.getName();
} }
Filter filter = Filter.createEqualityFilter(searchField, name); Filter notFilter = Filter.createNOTFilter(Filter.createPresenceFilter(LDAP_NSACCOUNTLOCK));
Filter equalsFilter = Filter.createEqualityFilter(searchField, name);
Filter filter = Filter.createANDFilter(notFilter, equalsFilter);
logger.debug("getUser: search filter = " + filter); logger.debug("getUser: search filter = " + filter);
SearchRequest searchRequest = new SearchRequest(usersDN, SearchScope.ONE, filter, userAttribs); SearchRequest searchRequest = new SearchRequest(usersDN, SearchScope.ONE, filter, userAttribs);
...@@ -620,8 +622,10 @@ public class LdapUserDAO extends LdapDAO ...@@ -620,8 +622,10 @@ public class LdapUserDAO extends LdapDAO
Filter filter = null; Filter filter = null;
try try
{ {
filter = Filter.createEqualityFilter("email", emailAddress); Filter notFilter = Filter.createNOTFilter(Filter.createPresenceFilter(LDAP_NSACCOUNTLOCK));
logger.debug("getUserByEmailAddress: search filter = " + filter); Filter equalsFilter = Filter.createEqualityFilter("email", emailAddress);
filter = Filter.createANDFilter(notFilter, equalsFilter);
logger.debug("search filter: " + filter);
SearchRequest searchRequest = SearchRequest searchRequest =
new SearchRequest(usersDN, SearchScope.ONE, filter, userAttribs); new SearchRequest(usersDN, SearchScope.ONE, filter, userAttribs);
...@@ -695,7 +699,11 @@ public class LdapUserDAO extends LdapDAO ...@@ -695,7 +699,11 @@ public class LdapUserDAO extends LdapDAO
{ {
name = userID.getName(); name = userID.getName();
} }
Filter filter = Filter.createEqualityFilter(searchField, name);
Filter notFilter = Filter.createNOTFilter(Filter.createPresenceFilter(LDAP_NSACCOUNTLOCK));
Filter equalsFilter = Filter.createEqualityFilter(searchField, name);
Filter filter = Filter.createANDFilter(notFilter, equalsFilter);
profiler.checkpoint("getAugmentedUser.createFilter"); profiler.checkpoint("getAugmentedUser.createFilter");
logger.debug("getAugmentedUser: search filter = " + filter); logger.debug("getAugmentedUser: search filter = " + filter);
...@@ -811,7 +819,9 @@ public class LdapUserDAO extends LdapDAO ...@@ -811,7 +819,9 @@ public class LdapUserDAO extends LdapDAO
{ {
final Collection<User> users = new ArrayList<User>(); final Collection<User> users = new ArrayList<User>();
Filter filter = Filter.createPresenceFilter(LDAP_UID); Filter notFilter = Filter.createNOTFilter(Filter.createPresenceFilter(LDAP_NSACCOUNTLOCK));
Filter presenceFilter = Filter.createPresenceFilter(LDAP_UID);
Filter filter = Filter.createANDFilter(notFilter, presenceFilter);
logger.debug("search filter: " + filter); logger.debug("search filter: " + filter);
final String[] attributes = new String[] final String[] attributes = new String[]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment