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

Function parseRoles

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

Source from the content-addressed store, hash-verified

59const TOOLKIT_MCP_SEGMENT = "/mcp/toolkits/";
60
61const parseRoles = (role: string | null | undefined): ReadonlyArray<string> =>
62 (role ?? "user")
63 .split(",")
64 .map((r) => r.trim())
65 .filter((r) => r.length > 0);
66
67/**
68 * 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