MCPcopy
hub / github.com/codeaashu/claude-code / isRestrictedToPluginOnly

Function isRestrictedToPluginOnly

src/utils/settings/pluginOnlyPolicy.ts:19–27  ·  view source on GitHub ↗
(
  surface: CustomizationSurface,
)

Source from the content-addressed store, hash-verified

17 * Absent/undefined → nothing locked (the default).
18 */
19export function isRestrictedToPluginOnly(
20 surface: CustomizationSurface,
21): boolean {
22 const policy =
23 getSettingsForSource('policySettings')?.strictPluginOnlyCustomization
24 if (policy === true) return true
25 if (Array.isArray(policy)) return policy.includes(surface)
26 return false
27}
28
29/**
30 * Sources that bypass strictPluginOnlyCustomization. Admin-trusted because:

Callers 9

runAgentFunction · 0.85
getMcpConfigByNameFunction · 0.85
getClaudeCodeMcpConfigsFunction · 0.85
loadSkillsDir.tsFile · 0.85
addSkillDirectoriesFunction · 0.85

Calls 1

getSettingsForSourceFunction · 0.85

Tested by

no test coverage detected