mauriciovigolo / keycloak-angular

Easy Keycloak setup for Angular applications.
MIT License
725 stars 278 forks source link

feature: Add resource filter to KeycloakService#getUserRoles() #523

Closed daniel-shuy closed 10 months ago

daniel-shuy commented 11 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #522

What is the new behavior?

Added a new resource parameter to KeycloakService#getUserRoles().

This parameter can be used to filter resource roles by a resource (usually clientId).

If the parameter is not specified, the function returns all resource roles, as-per the current behavior, to avoid any breaking changes.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

mauriciovigolo commented 10 months ago

Hey @daniel-shuy, thank you for opening the PR. I will evaluate to add it in the next release which will happen on 19.11.

daniel-shuy commented 7 months ago

Hi @mauriciovigolo, since this feature isn't a breaking change, is it possible to backport it to v14? Our company isn't ready to upgrade to Angular 17 yet (not all our library dependencies are Angular 17 ready)

mauriciovigolo commented 7 months ago

Hi Daniel 👋

Yes, we could do that! I could work on it this week, would that be okay?

daniel-shuy commented 7 months ago

@mauriciovigolo Sure, no hurry, thanks!

mauriciovigolo commented 6 months ago

Hi @daniel-shuy, keycloak-angular@v14.0.3 contains these changes and also supports keycloak-js@24. All the best 🙂