Skip to content

Commit

Permalink
fix: Grant access to users table
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Sep 20, 2023
1 parent f721407 commit 61f1f3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,13 @@
- role: teamEditor
permission:
columns:
- created_at
- email
- first_name
- id
- is_platform_admin
- last_name
filter: {}
- updated_at
filter:
id:
_eq: x-hasura-user-id
2 changes: 2 additions & 0 deletions hasura.planx.uk/tests/users.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ describe("users", () => {
i = await introspectAs("teamEditor");
});

// Row-level permissions tested in e2e/tests/api-driven
// teamEditors can only query their own record
test("can query users", async () => {
expect(i.queries).toContain("users");
});
Expand Down

0 comments on commit 61f1f3b

Please sign in to comment.