Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keycloak_client_rolemapping.py: add support for subgroups #6687

Conversation

mikhail-putilov
Copy link
Contributor

SUMMARY

There was a missing parents parameter which prevented my ansible scripts from mapping roles to subgroups

The fix was easy, as everything was already implemented and only missing parents parameter needed to be added.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

keycloak_client_rolemapping

ADDITIONAL INFORMATION

I needed to map a role to a subgroup but I could not because there was a missing parameter parents in the python script. Adding it solved the issue.

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added WIP Work in progress feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests unit tests/unit labels Jun 14, 2023
@@ -144,6 +171,24 @@
id: role_id2
delegate_to: localhost

- name: Map a client role to a subgroup, authentication with token
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy of YAML above with one additional parents parameter and slightly changed name

@@ -63,6 +63,33 @@
- Name of the group to be mapped.
- This parameter is required (can be replaced by gid for less API call).

parents:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy of a documentation from

slightly adjusted

@mikhail-putilov mikhail-putilov marked this pull request as ready for review June 14, 2023 09:53
@ansibullbot ansibullbot removed the WIP Work in progress label Jun 14, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-7 labels Jun 14, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I've added some first comments.

mikhail-putilov and others added 5 commits June 15, 2023 09:10
…t-rolemapping.yml


Add missing URL

Co-authored-by: Felix Fontein <felix@fontein.de>
Set a correct version_added (previously it was a copy-paste)

Co-authored-by: Felix Fontein <felix@fontein.de>
Fix typo after copy-paste

Co-authored-by: Felix Fontein <felix@fontein.de>
Fix typo after copy-paste

Co-authored-by: Felix Fontein <felix@fontein.de>
Fix typo after copy-paste

Co-authored-by: Felix Fontein <felix@fontein.de>
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jun 15, 2023
@mikhail-putilov
Copy link
Contributor Author

I appreciate you helping me out :-)
Thanks

@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jun 15, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (without really knowing keycloak). If nobody objects, I'll merge on Sunday evening.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 18, 2023
@felixfontein felixfontein merged commit e06a0e2 into ansible-collections:main Jun 18, 2023
@patchback
Copy link

patchback bot commented Jun 18, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/e06a0e22f76a9fc184d33564b6a3689b5a814ae0/pr-6687

Backported as #6723

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jun 18, 2023
* keycloak_client_rolemapping.py: add support for subgroups

* Add PR number after creating a PR to 6687-support-subgroups-for-keycloak-client-rolemapping.yml

* Update changelogs/fragments/6687-support-subgroups-for-keycloak-client-rolemapping.yml

Add missing URL

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

* Update plugins/modules/keycloak_client_rolemapping.py

Set a correct version_added (previously it was a copy-paste)

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

---------

Co-authored-by: Mikhail Putilov <Mikhail.Putilov@dimoco.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e06a0e2)
@felixfontein
Copy link
Collaborator

@mikhail-putilov thanks for your contribution!

@mikhail-putilov
Copy link
Contributor Author

mikhail-putilov commented Jun 18, 2023 via email

felixfontein pushed a commit that referenced this pull request Jun 18, 2023
…: add support for subgroups (#6723)

keycloak_client_rolemapping.py: add support for subgroups (#6687)

* keycloak_client_rolemapping.py: add support for subgroups

* Add PR number after creating a PR to 6687-support-subgroups-for-keycloak-client-rolemapping.yml

* Update changelogs/fragments/6687-support-subgroups-for-keycloak-client-rolemapping.yml

Add missing URL

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

* Update plugins/modules/keycloak_client_rolemapping.py

Set a correct version_added (previously it was a copy-paste)

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

---------

Co-authored-by: Mikhail Putilov <Mikhail.Putilov@dimoco.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e06a0e2)

Co-authored-by: Mikhail Putilov <post.snowy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants