MCPcopy
hub / github.com/simstudioai/sim / isSameOrgMember

Function isSameOrgMember

apps/sim/lib/invitations/direct-grant.ts:50–57  ·  view source on GitHub ↗
(
  userId: string,
  workspaceOrganizationId: string | null
)

Source from the content-addressed store, hash-verified

48 * workspace access.
49 */
50export async function isSameOrgMember(
51 userId: string,
52 workspaceOrganizationId: string | null
53): Promise<boolean> {
54 if (!workspaceOrganizationId) return false
55 const membership = await getUserOrganization(userId)
56 return !!membership && membership.organizationId === workspaceOrganizationId
57}
58
59/**
60 * Cancels any pending single-workspace invitations that grant exactly this

Callers 1

Calls 1

getUserOrganizationFunction · 0.90

Tested by

no test coverage detected