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

Update docs for get_composite_realm_roles_of_user #586

Open
ttante opened this issue Aug 2, 2024 · 0 comments
Open

Update docs for get_composite_realm_roles_of_user #586

ttante opened this issue Aug 2, 2024 · 0 comments

Comments

@ttante
Copy link

ttante commented Aug 2, 2024

Hey all - I tried to make a PR myself but access was denied.

In the Keycloak admin panel under User > User Details, there is a toggle to view/hide 'Inherted' roles (roles inherited from composite roles - in this case roles that come from a group mapping to multiple roles).
Screenshot 2024-08-02 at 11 28 36 AM

The method get_realm_roles_of_user() does not return these, and it took me a long time to figure out that I needed to use get_composite_realm_roles_of_user() to access these roles.

It would be really helpful if the (documentation description for get_composite_realm_roles_of_user)[https://python-keycloak.readthedocs.io/en/latest/reference/keycloak/index.html#keycloak.KeycloakAdmin.get_composite_realm_roles_of_user] specified that the endpoint also includes roles Inherited from composites. If this were the case I would have saved hours.

I've been working with Keycloak for about 8 months now and it is a steep learning curve, but I would like to help alleviate the challenges for others as much as I can.

The description currently reads:
"Get all composite (i.e. implicit) realm roles for a user."
I think something like this should be appended: "Includes roles inherited from composites."

Thanks everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant