mirror of
https://github.com/keycloak/keycloak.git
synced 2026-04-15 22:09:46 -04:00
Pre-compute the full effective role set once in ClientRoleMappingsResource.getCompositeClientRoleMappings() using RoleUtils.getDeepRoleMappings(), then filter by client. This replaces the previous O(C*M*D) approach of calling user.hasRole() for every client role, which recursively expanded composites without memoization. RoleUtils.getDeepRoleMappings(RoleMapperModel) is introduced to handle both RoleMapperModel implementations correctly: UserModel includes group-inherited roles (matching UserModel.hasRole() semantics), while GroupModel expands only its direct composite mappings. The CompositeClientRoleMappingsTest is migrated from the deprecated Arquillian framework to the new Keycloak test framework (JUnit 5). Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io> |
||
|---|---|---|
| .. | ||
| src | ||
| pom.xml | ||