From 78a6629acbc7a47617b0699da5489fb8fb9e46ec Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Mon, 14 Oct 2024 14:45:18 +1100 Subject: [PATCH] fix: allow platform to delete systemwide tasks --- services/api/src/resources/task/task_definition_resolvers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/api/src/resources/task/task_definition_resolvers.ts b/services/api/src/resources/task/task_definition_resolvers.ts index a783eb9427..ef89d8bd0f 100644 --- a/services/api/src/resources/task/task_definition_resolvers.ts +++ b/services/api/src/resources/task/task_definition_resolvers.ts @@ -736,8 +736,11 @@ export const deleteAdvancedTaskDefinition = async ( group: group.id }); break; + case AdvancedTaskDefinitionTarget.SystemWide: + await hasPermission('advanced_task', 'delete:advanced'); + break; default: - throw Error('Images and System Wide Tasks are not yet supported'); + throw Error('Image Tasks are not yet supported'); } const rows = await query(