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

Function parseRoles

apps/host-selfhost/src/mcp/index.ts:77–81  ·  view source on GitHub ↗
(role: string | null | undefined)

Source from the content-addressed store, hash-verified

75 });
76
77const parseRoles = (role: string | null | undefined): ReadonlyArray<string> =>
78 (role ?? "user")
79 .split(",")
80 .map((r) => r.trim())
81 .filter((r) => r.length > 0);
82
83type BetterAuthSession = NonNullable<
84 Awaited<ReturnType<BetterAuthHandle["auth"]["api"]["getSession"]>>

Callers 1

principalFromSessionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected