SEC-1098: Added ignorePartialResultException property which is set on the LDAP template.

This commit is contained in:
Luke Taylor
2009-04-21 03:37:16 +00:00
parent 06040853da
commit b2b2c95e55
2 changed files with 17 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ import org.springframework.security.ldap.SpringSecurityLdapTemplate;
import org.springframework.security.ldap.LdapAuthoritiesPopulator;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.core.DirContextOperations;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.util.Assert;
import org.apache.commons.logging.Log;
@@ -292,4 +293,13 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
int searchScope = searchSubtree ? SearchControls.SUBTREE_SCOPE : SearchControls.ONELEVEL_SCOPE;
searchControls.setSearchScope(searchScope);
}
/**
* Sets the corresponding property on the underlying template, avoiding specific issues with Active Directory.
*
* @see LdapTemplate#setIgnoreNameNotFoundException(boolean)
*/
public void setIgnorePartialResultException(boolean ignore) {
ldapTemplate.setIgnorePartialResultException(ignore);
}
}