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

KeycloakService#getUserRoles() filter by resource #522

Closed
daniel-shuy opened this issue Nov 8, 2023 · 2 comments
Closed

KeycloakService#getUserRoles() filter by resource #522

daniel-shuy opened this issue Nov 8, 2023 · 2 comments
Assignees
Labels
enhancement This issue/PR is an enhancement or new feature. evaluate-in-next-version Evaluate if the feature or change might be included in the next library release.

Comments

@daniel-shuy
Copy link
Contributor

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search for issues before submitting
- [x] feature request

Versions.

keycloak-angular: 14.1.0

Desired functionality.

Currently, KeycloakService#getUserRoles() returns resource roles for all resources, not just the current clientId, which can be problematic if there is another resource role used by another client that has the same name.

There is currently no way to filter the resource roles by the current clientId besides manually looping through each role and calling KeycloakService#isUserInRole(), which is very inefficient.

daniel-shuy added a commit to daniel-shuy/keycloak-angular that referenced this issue Nov 8, 2023
daniel-shuy added a commit to daniel-shuy/keycloak-angular that referenced this issue Nov 8, 2023
@mauriciovigolo mauriciovigolo added enhancement This issue/PR is an enhancement or new feature. evaluate-in-next-version Evaluate if the feature or change might be included in the next library release. labels Nov 17, 2023
@mauriciovigolo
Copy link
Owner

Hi @daniel-shuy, this is a nice improvement. I will review and test your PR to include it in the next release.
Thank you 😊

@mauriciovigolo
Copy link
Owner

Hey @daniel-shuy, your changes were included in https://github.com/mauriciovigolo/keycloak-angular/releases/tag/v15.0.0

Thank you for contributing! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR is an enhancement or new feature. evaluate-in-next-version Evaluate if the feature or change might be included in the next library release.
Projects
None yet
Development

No branches or pull requests

2 participants