mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 21:22:44 +00:00
keycloak_user_rolemapping: handle None response for client role lookup (#11471)
* fix(keycloak_user_rolemapping): handle None response for client role lookup
When adding a client role to a user who has no existing roles for that
client, get_client_user_rolemapping_by_id() returns None. The existing
code indexed directly into the result causing a TypeError. Add the same
None check that already existed for realm roles since PR #11256.
Fixes #10960
* fix(tests): use dict format for task vars in keycloak_user_rolemapping tests
Task-level vars requires a YAML mapping, not a sequence. The leading
dash (- roles:) produced a list instead of a dict, which ansible-core
2.20 rejects with "Vars in a Task must be specified as a dictionary".
* Update changelogs/fragments/keycloak-user-rolemapping-client-none-check.yml
---------
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| .keep | ||
| 5117-maven-artifact-snapshot-resolution.yml | ||
| 11430-fix-keycloak-client-diff-for-flow-overrides.yml | ||
| 11453-keycloak-client-protocol-mapper-ids.yml | ||
| 11486-seport-dccp-sctp.yaml | ||
| 11488-mh-ensure-compatibiliy-with-module-tests.yml | ||
| 11492-python_requires_info.yml | ||
| 11503-keycloak-group-search-optimization.yml | ||
| 11504-redfish-info-add-results-to-return.yml | ||
| fix-nsupdate-keyring.yml | ||
| keycloak-client-add-missing-fields.yml | ||
| keycloak-realm-key-generated-providers.yml | ||
| keycloak-realm-key-keyerror-bugfix.yml | ||
| keycloak-url-encode-query-params.yml | ||
| keycloak-user-rolemapping-client-none-check.yml | ||