mapPermissionToFGA() — supabase Function Reference
Architecture documentation for the mapPermissionToFGA() function in AccessToken.utils.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 57941846_d7e6_6a25_9582_2aaaab8b9f4d["mapPermissionToFGA()"] 871e24a9_af4f_d982_ab63_afb529f14e75["NewScopedTokenSheet()"] 871e24a9_af4f_d982_ab63_afb529f14e75 -->|calls| 57941846_d7e6_6a25_9582_2aaaab8b9f4d style 57941846_d7e6_6a25_9582_2aaaab8b9f4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Account/AccessTokens/AccessToken.utils.ts lines 66–75
export const mapPermissionToFGA = (
resourceKey: string,
action: string
): ScopedAccessTokenPermission[] => {
const [scope, resource] = resourceKey.split(':')
const match = PERMISSION_LIST.find(
(p) => p.scope === scope && p.resource === resource && p.action === action
)
return match ? [match.id as ScopedAccessTokenPermission] : []
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does mapPermissionToFGA() do?
mapPermissionToFGA() is a function in the supabase codebase.
What calls mapPermissionToFGA()?
mapPermissionToFGA() is called by 1 function(s): NewScopedTokenSheet.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free