diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/store/team.ts b/editor.planx.uk/src/pages/FlowEditor/lib/store/team.ts index 521ce4a38c..824e6cb93b 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/store/team.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/store/team.ts @@ -94,6 +94,9 @@ export const teamStore: StateCreator< } } } + integrations { + hasPlanningData: has_planning_data + } } } `, diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index c339ea6d57..fd56e9f079 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -1672,6 +1672,14 @@ - staging_govpay_secret - power_automate_webhook_url filter: {} + - role: platformAdmin + permission: + columns: + - has_planning_data + - id + - team_id + filter: {} + comment: "" - role: public permission: columns: @@ -1680,6 +1688,14 @@ - team_id filter: {} comment: "" + - role: teamEditor + permission: + columns: + - has_planning_data + - id + - team_id + filter: {} + comment: "" - table: name: team_members schema: public diff --git a/hasura.planx.uk/tests/team_integrations.test.js b/hasura.planx.uk/tests/team_integrations.test.js index 33c11d6cc4..aab8de9680 100644 --- a/hasura.planx.uk/tests/team_integrations.test.js +++ b/hasura.planx.uk/tests/team_integrations.test.js @@ -7,7 +7,7 @@ describe("team_integrations", () => { i = await introspectAs("public"); }); - test("cannot query team_integrations", () => { + test("can query team_integrations", () => { expect(i.queries).toContain("team_integrations"); }); @@ -36,8 +36,8 @@ describe("team_integrations", () => { i = await introspectAs("platformAdmin"); }); - test("cannot query team_integrations", () => { - expect(i.queries).not.toContain("team_integrations"); + test("cann query team_integrations", () => { + expect(i.queries).toContain("team_integrations"); }); test("can create but, cannot update, or delete team_integrations", () => { @@ -52,8 +52,8 @@ describe("team_integrations", () => { i = await introspectAs("teamEditor"); }); - test("cannot query team_integrations", () => { - expect(i.queries).not.toContain("team_integrations"); + test("can query team_integrations", () => { + expect(i.queries).toContain("team_integrations"); }); test("cannot create, update, or delete team_integrations", () => {