From ba1b5fa729d212fea0dcefb36f98a95056ad4df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 30 Oct 2024 16:18:55 +0000 Subject: [PATCH] fix: Grant additional permissions to demoUser role --- hasura.planx.uk/metadata/tables.yaml | 29 ++++++++++++++++++++++ hasura.planx.uk/tests/team_members.test.js | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index b24e87efbb..81314d1ab9 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -1960,6 +1960,17 @@ - role - id filter: {} + - role: demoUser + permission: + columns: + - team_id + - user_id + - role + - id + filter: + user_id: + _eq: x-hasura-user-id + comment: "" - role: platformAdmin permission: columns: @@ -2037,6 +2048,24 @@ - team_id filter: {} comment: "" + - role: demoUser + permission: + columns: + - id + - external_planning_site_name + - external_planning_site_url + - homepage + - help_email + - help_opening_hours + - help_phone + - email_reply_to_id + - team_id + - boundary_bbox + - submission_email + - reference_code + - boundary_url + filter: {} + comment: "" - role: platformAdmin permission: columns: diff --git a/hasura.planx.uk/tests/team_members.test.js b/hasura.planx.uk/tests/team_members.test.js index f46b3609dd..5a0c47f81f 100644 --- a/hasura.planx.uk/tests/team_members.test.js +++ b/hasura.planx.uk/tests/team_members.test.js @@ -66,8 +66,8 @@ describe("team_members", () => { i = await introspectAs("demoUser"); }); - test("cannot query teams", () => { - expect(i.queries).not.toContain("team_members"); + test("can query teams", () => { + expect(i.queries).toContain("team_members"); }); test("cannot create, update, or delete team_members", () => {