Files
ansible-middleware.keycloak/plugins
Filipe Rosa Capela 07438ad4af keycloak_user: fix check mode reporting changed=True for every existing user
In check mode, the desired group memberships were built as a set and
compared with the stored memberships, a list, through is_struct_included().
It has no branch for sets and falls back to comparing their string forms,
which never match, so check mode reported a change for every existing user,
with or without groups.

Check mode now decides like normal mode: a group given by name or by path
counts as joined when the user is already a member. That rule moves from
update_user_groups_membership() into
filter_groups_to_add_to_and_remove_from_user(), which both modes use, and
the groups reported in check mode no longer list a group given by path
twice. Add check mode tests, including groups given by path.

Fixes #442

Signed-off-by: Filipe Rosa Capela <Filipe.Capela-CIC.Netherlands1@ibm.com>
2026-10-13 18:23:51 +02:00
..