verifa / horizon

Building blocks and patterns for creating a minimal internal developer platform
Apache License 2.0
8 stars 1 forks source link

Implement ability to get roles for a user from `auth` #15

Open jlarfors opened 3 months ago

jlarfors commented 3 months ago

If the auth package supported a Roles(...) method to get the list of roles for a user (e.g. based on groups and role bindings) this could be attached to the UserInfo and used by a web UI to hide/show elements, for example.

jlarfors commented 3 months ago

This cannot be handled on a "global" level and should be handled on an account level.

E.g. if a user wants to work against account foo, the auth should be able to tell which roles the user belongs to within account foo.