( userId: string, workspaceOrganizationId: string | null )
| 48 | * workspace access. |
| 49 | */ |
| 50 | export 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 |
no test coverage detected