Skip to content

Scope impersonation fetches scopes for users without access #3017

@adityathebe

Description

@adityathebe

The user profile dropdown mounts ScopeImpersonationModal even when the modal is closed. That component immediately calls useScopesQuery(), causing repeated requests to GET /api/db/scopes?select=*,created_by(id,name,avatar,email)&deleted_at=is.null. For users without permission to read scopes, this spams the API with 403s. Scope impersonation should only be available/queried for roles that can access scopes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions