mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #7563/09b9ea46 backport][stable-8] Set resources payload as a list (#7574)
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:
parent
a60cba237f
commit
feefec42df
2 changed files with 3 additions and 1 deletions
|
@ -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).
|
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue