Skip to content

Commit

Permalink
feat: Allow platformAdmin role to delete flows
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Sep 28, 2023
1 parent bfb3fca commit 6c4ac92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@
_eq: teamEditor
check: null
delete_permissions:
- role: platformAdmin
permission:
backend_only: false
filter: {}
- role: teamEditor
permission:
backend_only: false
Expand Down
5 changes: 5 additions & 0 deletions hasura.planx.uk/tests/flows.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down

0 comments on commit 6c4ac92

Please sign in to comment.