Skip to content

Commit

Permalink
feat: Grant platformAdmin user update permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Oct 2, 2023
1 parent 758ea99 commit 2d948a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,3 +1148,10 @@
filter:
id:
_eq: x-hasura-user-id
update_permissions:
- role: platformAdmin
permission:
columns:
- email
filter: {}
check: {}
8 changes: 4 additions & 4 deletions hasura.planx.uk/tests/users.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ describe("users", () => {
expect(i.queries).toContain("users");
});

test("can creates users", () => {
test("can create and update users", () => {
expect(i.mutations).toContain("insert_users");
expect(i.mutations).toContain("update_users_by_pk");
expect(i.mutations).toContain("update_users");
});

test("cannot update or delete users", () => {
expect(i.mutations).not.toContain("update_users_by_pk");
expect(i.mutations).not.toContain("update_users");
test("cannot delete users", () => {
expect(i.mutations).not.toContain("delete_users");
});
});
Expand Down

0 comments on commit 2d948a6

Please sign in to comment.