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

Function parseRoles

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

Source from the content-addressed store, hash-verified

60const TOOLKIT_MCP_SEGMENT = "/mcp/toolkits/";
61
62const parseRoles = (role: string | null | undefined): ReadonlyArray<string> =>
63 (role ?? "user")
64 .split(",")
65 .map((r) => r.trim())
66 .filter((r) => r.length > 0);
67
68/**
69 * The admin plugin's `role` column is populated at runtime but isn't part of

Callers 1

principalFromUserIdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected