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

Include .role in session.user object #200

Open
joepavitt opened this issue Dec 15, 2023 · 2 comments
Open

Include .role in session.user object #200

joepavitt opened this issue Dec 15, 2023 · 2 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@joepavitt
Copy link
Contributor

Description

It would be great if we could also include the underlying FF User's "role" within the returned session.user object when authenticating with FF.

@joepavitt joepavitt added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Dec 15, 2023
@knolleary
Copy link
Member

The current code uses the/api/v1/user endpoint to get the user profile information. This is outside the scope of an individual team/instance so cannot include role information.

We do have the ability to make a second request (added here) to do the necessary lookup - but we'll require the team/instance information.

To get that info, we'll need to update runtimeSettings to pass the team/instance ids through the options object to the auth middleware.

Then we'll be able to get the user's role for the team.

That said, I'm aware we have finer-grained RBAC in the plan fairly soon. We should give that a bit of consideration as it will allow a user to a role for the instance which isn't necessarily the same as their role in the team.

@joepavitt
Copy link
Contributor Author

Thanks Nick - no rush on this feature btw - it's not blocking anything - just a very nice to have at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
Status: No status
Development

No branches or pull requests

2 participants