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

Function switchOrg

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

Source from the content-addressed store, hash-verified

149/** Switch this account's active org; returns the identity scoped to it via
150 * the per-request org-selector header (no session mutation involved). */
151const switchOrg = (
152 _target: TargetShape,
153 identity: Identity,
154 organizationId: string,
155): Effect.Effect<Identity> =>
156 Effect.succeed({
157 ...identity,
158 headers: { ...identity.headers, [ORG_SELECTOR_HEADER]: organizationId },
159 });
160
161/** The org this identity's requests are scoped to (selector header included,
162 * mirroring the web client). */

Calls

no outgoing calls

Tested by

no test coverage detected