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

Function authorizeAs

apps/cloud/src/admin/admin-users-api.node.test.ts:156–165  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

154 );
155
156const authorizeAs = (userId: string) =>
157 authorizeTenant(
158 new Request("https://admin.invalid", {
159 headers: { cookie: "wos-session=sealed", [ORG_SELECTOR_HEADER]: ORG },
160 }),
161 ).pipe(
162 Effect.provide(
163 Layer.mergeAll(stubDirectory, stubApiKeys, stubUsers, stubWorkOS(userId), stubMirror),
164 ),
165 );
166
167describe("authorizeTenant · admin session", () => {
168 it.effect("an active admin resolves the selected org as the tenant", () =>

Callers 1

Calls 2

authorizeTenantFunction · 0.90
stubWorkOSFunction · 0.70

Tested by

no test coverage detected