[PR #10840/b865bf57 backport][stable-11] Fix keycloak sub-group search (#10846)

Fix keycloak sub-group search (#10840)

* fix bug in missing realm argument when searching for groups

* MR change fragment

* 39+1=40

(cherry picked from commit b865bf5751)

Co-authored-by: Jakub Danek <danekja@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-09-21 20:44:22 +02:00 committed by GitHub
commit ff6735f0ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- keycloak_group - fixes an issue where module ignores realm when searching subgroups by name (https://github.com/ansible-collections/community.general/pull/10840).

View file

@ -1671,7 +1671,7 @@ class KeycloakAPI(object):
return None return None
for p in name_chain[1:]: for p in name_chain[1:]:
for sg in self.get_subgroups(tmp): for sg in self.get_subgroups(tmp, realm):
pv, is_id = self._get_normed_group_parent(p) pv, is_id = self._get_normed_group_parent(p)
if is_id: if is_id: