1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #7563/09b9ea46 backport][stable-7] Set resources payload as a list (#7573)

Set resources payload as a list (#7563)

* Set resources payload as a list

* Update changelogs/fragments/7151-fix-keycloak_authz_permission-incorrect-resource-payload.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 09b9ea466f)

Co-authored-by: fostermi <mfosterm@gmail.com>
This commit is contained in:
patchback[bot] 2023-11-22 19:20:53 +01:00 committed by GitHub
parent a70de88577
commit cd333e6575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- keycloak_authz_permission - resource payload variable for scope-based permission was constructed as a string, when it needs to be a list, even for a single item (https://github.com/ansible-collections/community.general/issues/7151).

View file

@ -330,7 +330,7 @@ def main():
if not r:
module.fail_json(msg='Unable to find authorization resource with name %s for client %s in realm %s' % (resources[0], cid, realm))
else:
payload['resources'] = r['_id']
payload['resources'].append(r['_id'])
for rs in r['scopes']:
resource_scopes.append(rs['id'])