mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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>
This commit is contained in:
parent
d530470d30
commit
09b9ea466f
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:
|
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))
|
module.fail_json(msg='Unable to find authorization resource with name %s for client %s in realm %s' % (resources[0], cid, realm))
|
||||||
else:
|
else:
|
||||||
payload['resources'] = r['_id']
|
payload['resources'].append(r['_id'])
|
||||||
|
|
||||||
for rs in r['scopes']:
|
for rs in r['scopes']:
|
||||||
resource_scopes.append(rs['id'])
|
resource_scopes.append(rs['id'])
|
||||||
|
|
Loading…
Reference in a new issue