Skip to content

Commit

Permalink
Merge pull request #3653 from uselagoon/keycloak-opensearch-mapper-fix
Browse files Browse the repository at this point in the history
fix: use new stream endpoints for token mapper
  • Loading branch information
tobybellwood authored Feb 15, 2024
2 parents 06a6e44 + 02a1f71 commit 8f321f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/keycloak/javascript/mappers/groups-and-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var projectGroupProjectIds = new HashMap();

var forEach = Array.prototype.forEach;
// add all groups the user is part of
forEach.call(user.getGroups().toArray(), function(group) {
forEach.call(user.getGroupsStream().toArray(), function(group) {
// remove the group role suffixes
// lets check if the group has a parent if this is a child
var groupName = group.getName().replace(/-(owner|maintainer|developer|reporter|guest)$/,"");
Expand Down Expand Up @@ -45,7 +45,7 @@ for each (var e in projectGroupProjectIds.keySet()) {
}

// add all roles the user is part of
forEach.call(user.getRoleMappings().toArray(), function(role) {
forEach.call(user.getRoleMappingsStream().toArray(), function(role) {
var roleName = role.getName();
groupsAndRoles.add(roleName);
});
Expand Down

0 comments on commit 8f321f0

Please sign in to comment.