MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasPermissions

Function hasPermissions

src/installer/config-writer.ts:52–60  ·  view source on GitHub ↗
(location: InstallLocation)

Source from the content-addressed store, hash-verified

50}
51
52export function hasPermissions(location: InstallLocation): boolean {
53 const file = location === 'global'
54 ? path.join(os.homedir(), '.claude', 'settings.json')
55 : path.join(process.cwd(), '.claude', 'settings.json');
56 const settings = readJsonFile(file);
57 const allow = settings.permissions?.allow;
58 if (!Array.isArray(allow)) return false;
59 return allow.some((p: string) => p.startsWith('mcp__codegraph__'));
60}

Callers

nothing calls this directly

Calls 2

readJsonFileFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected