Skip to content

Commit 824d13d

Browse files
committed
add: new executions:update permissions and apply it to PUT /api/v1/executions endpoint
1 parent 9ae635b commit 824d13d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/server/src/enterprise/rbac/Permissions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export class Permissions {
8888

8989
const executionsCategory = new PermissionCategory('executions')
9090
executionsCategory.addPermission(new Permission('executions:view', 'View', true, true, true))
91+
executionsCategory.addPermission(new Permission('executions:update', 'Update', true, true, true))
9192
executionsCategory.addPermission(new Permission('executions:delete', 'Delete', true, true, true))
9293
this.categories.push(executionsCategory)
9394

packages/server/src/routes/executions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ router.get('/', checkAnyPermission('executions:view'), executionController.getAl
88
router.get(['/', '/:id'], checkAnyPermission('executions:view'), executionController.getExecutionById)
99

1010
// PUT
11-
router.put(['/', '/:id'], executionController.updateExecution)
11+
router.put(['/', '/:id'], checkAnyPermission('executions:update'), executionController.updateExecution)
1212

1313
// DELETE - single execution or multiple executions
1414
router.delete('/:id', checkAnyPermission('executions:delete'), executionController.deleteExecutions)

0 commit comments

Comments
 (0)