MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / requireContext

Function requireContext

packages/core/sdk/src/owner-policy.ts:78–87  ·  view source on GitHub ↗
(
  tableName: string,
  access: string,
  context: ExecutorOwnerPolicyContext | undefined,
)

Source from the content-addressed store, hash-verified

76};
77
78const requireContext = (
79 tableName: string,
80 access: string,
81 context: ExecutorOwnerPolicyContext | undefined,
82): ExecutorOwnerPolicyContext => {
83 if (context) return context;
84 return policyViolation(
85 `Storage ${access} on table "${tableName}" is missing executor owner context.`,
86 );
87};
88
89/** The rows the bound `{ tenant, subject }` may see/mutate: org rows in the
90 * tenant, plus this subject's own user rows.

Callers 2

assertOwnerWritableFunction · 0.85
assertOwnerPatchFunction · 0.85

Calls 1

policyViolationFunction · 0.85

Tested by

no test coverage detected