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

Function requireContext

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

Source from the content-addressed store, hash-verified

40};
41
42const requireContext = (
43 tableName: string,
44 access: string,
45 context: ExecutorOwnerPolicyContext | undefined,
46): ExecutorOwnerPolicyContext => {
47 if (context) return context;
48 return policyViolation(
49 `Storage ${access} on table "${tableName}" is missing executor owner context.`,
50 );
51};
52
53/** The rows the bound `{ tenant, subject }` may see/mutate: org rows in the
54 * 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