MCPcopy Create free account
hub / github.com/codeaashu/claude-code / hasBashPermission

Function hasBashPermission

src/components/TrustDialog/utils.ts:45–52  ·  view source on GitHub ↗
(rules: PermissionRule[])

Source from the content-addressed store, hash-verified

43}
44
45function hasBashPermission(rules: PermissionRule[]): boolean {
46 return rules.some(
47 rule =>
48 rule.ruleBehavior === 'allow' &&
49 (rule.ruleValue.toolName === BASH_TOOL_NAME ||
50 rule.ruleValue.toolName.startsWith(BASH_TOOL_NAME + '(')),
51 )
52}
53
54/**
55 * Get which setting sources have bash allow rules.

Callers 1

getBashPermissionSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected