Skip to content

Commit 94a1cc1

Browse files
committed
feat(permission-groups): declare capabilities on the operations staging added
The merge brought three new operations, which the required capability field and the enforcement audit both refused until answered: files.search_content takes files.use like every sibling; the paused-execution read is exempt (its detail is pause points and resume state, never the fields logs.cost or logs.trace_spans withhold); SSO JIT admission runs before any membership exists, so no group can govern it yet.
1 parent f328c91 commit 94a1cc1

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/lib/auth/sso/application/operations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { defineOperation } from '@/lib/core/application/operation'
55
* exists. Workspace-role authorization cannot apply yet; the use case instead
66
* proves the exact provider link, verified domain, and provider-bound target.
77
*/
8+
// permission-group-exempt: SSO admission runs before any organization membership exists, so no group can govern the identity being admitted yet
89
export const ssoJitAdmissionOperation = defineOperation({
910
id: 'sso.jit-admit',
1011
principalKinds: ['session'] as const,
12+
capability: 'none',
1113
})

apps/sim/lib/workflows/application/operations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,12 @@ export const workflowOperations = {
440440
capability: 'none',
441441
...ALL_WORKFLOW_PRINCIPAL_POLICY,
442442
}),
443+
// permission-group-exempt: a paused execution's detail is pause points and resume state, not the run's execution data — the fields logs.cost and logs.trace_spans withhold never appear here
443444
readPausedExecution: defineWorkspaceOperation({
444445
id: 'workflows.paused_executions.read',
445446
minimumRole: 'read',
446447
workspaceApiKey: 'allow',
448+
capability: 'none',
447449
...ALL_WORKFLOW_PRINCIPAL_POLICY,
448450
}),
449451
/**

apps/sim/lib/workspace-files/application/operations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const fileOperations = {
4242
id: 'files.search_content',
4343
minimumRole: 'read',
4444
workspaceApiKey: 'allow',
45+
capability: 'files.use',
4546
...ALL_FILE_TOOL_PRINCIPAL_POLICY,
4647
}),
4748
download: defineWorkspaceOperation({

0 commit comments

Comments
 (0)