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

Function accountPolicyPattern

packages/react/src/lib/policy-pattern.ts:49–57  ·  view source on GitHub ↗
(owner: Owner, connection: string)

Source from the content-addressed store, hash-verified

47
48export const accountPolicyPattern =
49 (owner: Owner, connection: string) =>
50 (displayPattern: string): string => {
51 if (displayPattern === "*") return "*";
52 const firstDot = displayPattern.indexOf(".");
53 if (firstDot === -1) return `${displayPattern}.${owner}.${connection}.*`;
54 const integration = displayPattern.slice(0, firstDot);
55 const rest = displayPattern.slice(firstDot + 1);
56 return `${integration}.${owner}.${connection}.${rest}`;
57 };

Callers 3

ToolTreeFunction · 0.90
IntegrationDetailPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected