Forward isMemberOf call to the next delegate if the group is not managed by the mapper instance

Closes #40680

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
sguilhen 2025-07-07 10:41:23 -03:00 committed by Pedro Igor
parent 48886a3812
commit b7d3c8eb8b

View File

@ -767,7 +767,11 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
@Override
public boolean isMemberOf(GroupModel group) {
return isGroupInGroupPath(realm, group) && RoleUtils.isDirectMember(getGroupsStream(),group);
if (!isGroupInGroupPath(realm, group)) {
// this mapper doesn't manage the group - delegate to the next mapper or the JPA store.
return super.isMemberOf(group);
}
return RoleUtils.isDirectMember(getGroupsStream(),group);
}
protected Stream<GroupModel> getLDAPGroupMappingsConverted() {