Remove duplicate roles for IdP mapped roles
@@ -1725,7 +1725,13 @@ public class FrameworkUtils {
idpMappedUserRoles.add(idpRole);
}
}
- return idpMappedUserRoles;
+ List<String> idpMappedUniqueUserRoles = new ArrayList<>();
+ for (String role: idpMappedUserRoles) {
+ if (!idpMappedUniqueUserRoles.contains(role)) {
+ idpMappedUniqueUserRoles.add(role);
+ }
+ }
+ return idpMappedUniqueUserRoles;
}
/**
