Fixed issue if user sets duplicated LDAP roles for the same LibrePlan role.
FEA: ItEr75S06LdapAuhenticationItEr74S09
This commit is contained in:
parent
76659e4910
commit
aa989b07ae
2 changed files with 10 additions and 8 deletions
|
|
@ -185,8 +185,8 @@ public class LDAPConfiguration extends BaseEntity {
|
|||
return Collections.unmodifiableSet(configurationRolesLdap);
|
||||
}
|
||||
|
||||
public void setConfigurationRolesLdap(
|
||||
String roleLibreplan, List<String> rolesLdap) {
|
||||
public void setConfigurationRolesLdap(String roleLibreplan,
|
||||
Set<String> rolesLdap) {
|
||||
removeConfigurationRolesLdapForRoleLibreplan(roleLibreplan);
|
||||
|
||||
for (String roleLdap : rolesLdap) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
|
@ -818,12 +819,13 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
}, new Util.Setter<String>() {
|
||||
@Override
|
||||
public void set(String value) {
|
||||
configurationModel
|
||||
.getLdapConfiguration()
|
||||
.setConfigurationRolesLdap(
|
||||
role.name(),
|
||||
Arrays.asList(StringUtils
|
||||
.split(value, ";")));
|
||||
// Created a set in order to avoid duplicates
|
||||
Set<String> rolesLdap = new HashSet<String>(
|
||||
Arrays.asList(StringUtils.split(value,
|
||||
";")));
|
||||
configurationModel.getLdapConfiguration()
|
||||
.setConfigurationRolesLdap(role.name(),
|
||||
rolesLdap);
|
||||
}
|
||||
});
|
||||
textbox.setWidth("300px");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue