SEC-691: Applied patch to allow setting of returned user attributes from LDAP search.

This commit is contained in:
Luke Taylor 2008-03-27 14:41:11 +00:00
parent 350a626587
commit 1fece47b49
1 changed files with 13 additions and 1 deletions

View File

@ -155,6 +155,19 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
searchControls.setTimeLimit(searchTimeLimit);
}
/**
* Specifies the attributes that will be returned as part of the search.
*<p>
* null indicates that all attributes will be returned.
* An empty array indicates no attributes are returned.
*
* @param attrs An array of attribute names identifying the attributes that
* will be returned. Can be null.
*/
public void setReturningAttributes(String[] attrs) {
searchControls.setReturningAttributes(attrs);
}
public String toString() {
StringBuffer sb = new StringBuffer();
@ -164,7 +177,6 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
.append(searchControls.getSearchScope() == SearchControls.SUBTREE_SCOPE ? "subtree" : "single-level, ");
sb.append(", searchTimeLimit: ").append(searchControls.getTimeLimit());
sb.append(", derefLinkFlag: ").append(searchControls.getDerefLinkFlag()).append(" ]");
return sb.toString();
}
}