( toolId: string, policies: readonly ToolPolicyRow[], ownerRank: (row: Pick<ToolPolicyRow, "owner">) => number, defaultRequiresApproval?: boolean, )
| 245 | }); |
| 246 | |
| 247 | export const resolveEffectivePolicy = ( |
| 248 | toolId: string, |
| 249 | policies: readonly ToolPolicyRow[], |
| 250 | ownerRank: (row: Pick<ToolPolicyRow, "owner">) => number, |
| 251 | defaultRequiresApproval?: boolean, |
| 252 | ): EffectivePolicy => { |
| 253 | const match = resolveToolPolicy(toolId, policies, ownerRank); |
| 254 | return match ? liftUser(match) : liftPlugin(defaultRequiresApproval); |
| 255 | }; |
| 256 | |
| 257 | export const effectivePolicyFromSorted = ( |
| 258 | toolId: string, |
no test coverage detected