Skip to content

resolveViewOrganizationId

resolveViewOrganizationId(props): string | undefined

Defined in: packages/core/src/access/resolveViewOrganizationScope.ts:41

Resolves the caller’s own organization id for view scoping — undefined both when scoping is off (isViewOrganizationScopingEnabled is false) and when it’s on but the caller’s own organization doesn’t resolve. Callers that need to tell those two cases apart (e.g. to short-circuit to [] only in the second) should call isViewOrganizationScopingEnabled separately first — this function alone cannot distinguish them, by design: from “what id do I scope reads/writes by”, they’re the same answer (none).

VexAccessConfig<Record<string, SubjectEntry>, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>> | undefined

config.access (server) or useVexAccess() (client).

unknown

auth.organization (server) or useVexAuth().organization (client) — the server-resolved caller identity’s own organization record, never a client-supplied id.

string | undefined

The caller’s own organization id, or undefined.