From 6c4ac925738ba4dcb93c976388ae87b33942cd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Thu, 28 Sep 2023 12:46:59 +0100 Subject: [PATCH] feat: Allow platformAdmin role to delete flows --- hasura.planx.uk/metadata/tables.yaml | 4 ++++ hasura.planx.uk/tests/flows.test.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index 085cf4e6b7..ea27f02e96 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -283,6 +283,10 @@ _eq: teamEditor check: null delete_permissions: + - role: platformAdmin + permission: + backend_only: false + filter: {} - role: teamEditor permission: backend_only: false diff --git a/hasura.planx.uk/tests/flows.test.js b/hasura.planx.uk/tests/flows.test.js index c7c0075612..f4c0ff2ed2 100644 --- a/hasura.planx.uk/tests/flows.test.js +++ b/hasura.planx.uk/tests/flows.test.js @@ -58,6 +58,11 @@ describe("flows and operations", () => { expect(i.mutations).toContain("insert_flows"); }); + test("can delete flows", () => { + expect(i.mutations).toContain("delete_flows_by_pk"); + expect(i.mutations).toContain("delete_flows"); + }); + test("can query published flows", () => { expect(i.queries).toContain("published_flows"); });