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

Function canApproveTools

web/lib/collaboration/permissions.ts:21–28  ·  view source on GitHub ↗
(
  role: CollabRole,
  policy: "owner-only" | "any-collaborator",
  isOwner: boolean
)

Source from the content-addressed store, hash-verified

19}
20
21export function canApproveTools(
22 role: CollabRole,
23 policy: "owner-only" | "any-collaborator",
24 isOwner: boolean
25): boolean {
26 if (policy === "owner-only") return isOwner;
27 return hasPermission(role, "collaborator");
28}
29
30export function canManageAccess(role: CollabRole): boolean {
31 return role === "owner";

Callers

nothing calls this directly

Calls 1

hasPermissionFunction · 0.85

Tested by

no test coverage detected