Skip to content

whereHasOrgScope

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/database/src/lib/tenant-backstop.ts

True if organizationId appears anywhere in the where tree (top level or inside AND/OR/NOT), meaning the developer scoped the query intentionally. Presence — not value — is what we check; this is what keeps an intentional OR: [{ isPublic }, { organizationId }] from being flagged.

Signature

ts
function whereHasOrgScope(where: unknown): boolean

Parameters

NameType
whereunknown

Returns: boolean

Was this page helpful?

Download as PDF