Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix data source keycloak_group with nested group #334

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

chanhht
Copy link
Contributor

@chanhht chanhht commented Jul 3, 2020

This is the PR for fixing #333

The fix is not "complete", when there are multiple groups that match the filter name, it will return the first group it found (right now using DFS). This would cause some unexpected behaviors, for example, the data returned would change if new groups added with have the same with the data group name, or in case there are multiple nested groups share the same name, there is no option to get the desired one:

/core
--/developers
/cloud
--/developers

Unless we introduce another indicator (eg. path), I think this is the best we can try.
Notes: I am not too familiar with Golang if you found something weird, just let me know, thanks :)

Copy link
Contributor

@mrparkers mrparkers 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 the fix. this is probably the best we can do without some improvements to the Keycloak REST API.

@mrparkers mrparkers merged commit 9a4e23e into keycloak:master Jul 17, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants