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

Function switchOrg

e2e/cloud/connection-owner-isolation.test.ts:130–138  ·  view source on GitHub ↗
(
  _target: TargetShape,
  identity: Identity,
  organizationId: string,
)

Source from the content-addressed store, hash-verified

128/** Switch this account's active org; returns the identity scoped to it via
129 * the per-request org-selector header (no session mutation involved). */
130const switchOrg = (
131 _target: TargetShape,
132 identity: Identity,
133 organizationId: string,
134): Effect.Effect<Identity> =>
135 Effect.succeed({
136 ...identity,
137 headers: { ...identity.headers, [ORG_SELECTOR_HEADER]: organizationId },
138 });
139
140/** The org this identity's session is currently bound to. */
141const activeOrganizationId = (target: TargetShape, identity: Identity) =>

Calls

no outgoing calls

Tested by

no test coverage detected