rolesReturn.add(roleLdap.getRoleLibreplan());
continue;
}
// We must make a search for each role matching
DirContextAdapter adapter = null;
try {
adapter = (DirContextAdapter) ldapTemplate
.lookup(roleLdap.getRoleLdap() + "," + groupsPath);
} catch (org.springframework.ldap.NamingException ne) {
LOG.error(ne.getMessage());
}
if (adapter != null && adapter.attributeExists(roleProperty)) {
Attributes atrs = adapter.getAttributes();
if (atrs.get(roleProperty).contains(queryRoles)) {
rolesReturn.add(roleLdap.getRoleLibreplan());
}
}