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

Add the ability to debug a given Flagsmith user's permissions #5064

Open
matthewelwell opened this issue Jan 30, 2025 · 3 comments
Open

Add the ability to debug a given Flagsmith user's permissions #5064

matthewelwell opened this issue Jan 30, 2025 · 3 comments
Assignees
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard

Comments

@matthewelwell
Copy link
Contributor

As our permission system gets more complicated, answering the question “what resources does this Flagsmith user have access to?” is becoming annoying. Users can now have permissions directly, through groups, through roles, or through roles attached to groups. This will allow an administrator to see which resulting permissions a user has from any of their methods of attaching them.

@matthewelwell matthewelwell moved this to Planned 2025 in Flagsmith Roadmap Jan 30, 2025
@matthewelwell matthewelwell changed the title Add a 'permissions debugger' Add the ability to debug a given Flagsmith user's permissions Jan 30, 2025
@kyle-ssg
Copy link
Member

I guess this will need some form of API, we'd want to return where the permission is coming from, something like

/api/v1/environments/{environment_api_key}/user-permissions/{id}/all
/api/v1/projects/{project_id}/user-permissions/{id}/all


{
    "admin": boolean,
    "permissions": {
        "permission_key": string,
        "tags": number[],
        "derived_from": { // if both of these are undefined it means its a user permission
            "group": number | undefined, // what group it came from if any
            "role": number | undefined // what role it came from if any
        }
    }[]
}

@kyle-ssg kyle-ssg added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels Feb 26, 2025
@matthewelwell
Copy link
Contributor Author

Next steps on this one are:

  1. @tiagoapolo and @rolodato to discuss and design UI / build requirements (reach out to customers if needed)
  2. TBC - design API interface, similar to what kyle has suggested

@rolodato
Copy link
Member

rolodato commented Mar 6, 2025

Here is a brief video describing the problem without mentioning this specific solution/approach too much:

Screen.Recording.2025-03-06.at.11.56.04.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API front-end Issue related to the React Front End Dashboard
Projects
Status: Planned 2025
Development

No branches or pull requests

4 participants