(
siteOrgId: string,
reqUserOrgId: string | undefined
)
| 34 | // Simulates the condition check in verifySiteAccess: |
| 35 | // if (req.userOrgId && site.orgId !== req.userOrgId) { reject } |
| 36 | function shouldRejectCrossOrgSite( |
| 37 | siteOrgId: string, |
| 38 | reqUserOrgId: string | undefined |
| 39 | ): boolean { |
| 40 | // The actual check in verifySiteAccess is: |
| 41 | // if (req.userOrgId && site.orgId !== req.userOrgId) { reject } |
| 42 | return !!(reqUserOrgId && siteOrgId !== reqUserOrgId); |
| 43 | } |
| 44 | |
| 45 | // --- Tests --- |
| 46 |
no outgoing calls
no test coverage detected