keycloak module utils replace missing return in `get_role_composites` (#9691)

* fix: replace missing return (#9678)

* chore: add changelog fragment (#9678)

* chore: update changelog fragment (#9678)

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9705/head
Mark Armstrong 2025-02-08 15:39:22 -05:00 committed by GitHub
parent 10c15d31f7
commit 41caa9a22c
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 module utils - replaces missing return in get_role_composites method which caused it to return None instead of composite roles (https://github.com/ansible-collections/community.general/issues/9678, https://github.com/ansible-collections/community.general/pull/9691).

View File

@ -1856,7 +1856,7 @@ class KeycloakAPI(object):
else:
composite_url = URL_REALM_ROLE_COMPOSITES.format(url=self.baseurl, realm=realm, name=quote(rolerep["name"], safe=''))
# Get existing composites
self._request_and_deserialize(composite_url, method='GET')
return self._request_and_deserialize(composite_url, method='GET')
except Exception as e:
self.fail_request(e, msg='Could not get role %s composites in realm %s: %s'
% (rolerep['name'], realm, str(e)))