buildOwnerOrAdminShapeWhere
buildOwnerOrAdminShapeWhere(
ownerColumn,claims,options?):SQL<unknown> |null
Defined in: packages/contracts/src/supabase-rls.ts:336
The Electric shape where for an owner-or-admin table — the read counterpart of
buildSupabaseOwnerOrAdminNativePolicies, built from the same owner column. An admin gets
null (no filter, every row — the policy’s bypass branch); anyone else gets
buildOwnershipShapeWhere, i.e. their own rows, or the DENY_ALL sentinel when there is
no subject. Returning the sentinel by reference is what lets a customWhere built on this probe as
claims-dependent (isClaimsDependentRowFilter).
Parameters
Section titled “Parameters”ownerColumn
Section titled “ownerColumn”AnyColumn
claims
Section titled “claims”{[key: string]: unknown; app_metadata?: {[key: string]: unknown; roles?: string[]; }; sub?: string; } | null
options?
Section titled “options?”OwnerOrAdminAccessOptions = {}
Returns
Section titled “Returns”SQL<unknown> | null