}
SpringSecurityLdapTemplate authTemplate;
authTemplate = (SpringSecurityLdapTemplate) LDAPUtils
.getLdapTemplateInContext(ctx, ldapTemplate);
Set<String> userRoles = authTemplate.searchForSingleAttributeValues(
getGroupSearchBase(), groupSearchFilter, new String[] { userDn,
username }, groupRoleAttribute);
if (logger.isDebugEnabled()) {
logger.debug("Roles from search: " + userRoles);