MCPcopy Index your code
hub / github.com/simstudioai/sim / assertActiveWorkspaceAccess

Function assertActiveWorkspaceAccess

apps/sim/lib/workspaces/permissions/utils.ts:178–187  ·  view source on GitHub ↗
(
  workspaceId: string,
  userId: string
)

Source from the content-addressed store, hash-verified

176}
177
178export async function assertActiveWorkspaceAccess(
179 workspaceId: string,
180 userId: string
181): Promise<WorkspaceAccess> {
182 const access = await checkWorkspaceAccess(workspaceId, userId)
183 if (!access.exists || !access.hasAccess) {
184 throw new WorkspaceAccessDeniedError(workspaceId)
185 }
186 return access
187}
188
189/**
190 * Get the highest permission level a user has for a specific entity

Callers 9

buildWorkspaceMdDataFunction · 0.90
resolveOrCreateChatFunction · 0.90
getOrMaterializeVFSFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
GETFunction · 0.90
route.tsFile · 0.90

Calls 1

checkWorkspaceAccessFunction · 0.70

Tested by

no test coverage detected