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).
Parameters
Section titled “Parameters”access
Section titled “access”VexAccessConfig<Record<string, SubjectEntry>, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>> | undefined
config.access (server) or useVexAccess() (client).
organization
Section titled “organization”unknown
auth.organization (server) or useVexAuth().organization (client) — the
server-resolved caller identity’s own organization record, never a client-supplied id.
Returns
Section titled “Returns”string | undefined
The caller’s own organization id, or undefined.