From bd4588ad723b3be1e8e8d9d5ba86c8676fb35ab5 Mon Sep 17 00:00:00 2001 From: Wojciech Mista Date: Tue, 18 Jun 2024 09:49:55 +0200 Subject: [PATCH] Fix group permission issue for oauth users (#4963) * replace `user` query with `me` * changeset * change changeset --- .changeset/lucky-cameras-taste.md | 5 +++++ src/graphql/hooks.generated.ts | 2 +- src/permissionGroups/queries.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/lucky-cameras-taste.md diff --git a/.changeset/lucky-cameras-taste.md b/.changeset/lucky-cameras-taste.md new file mode 100644 index 00000000000..0a21be3f862 --- /dev/null +++ b/.changeset/lucky-cameras-taste.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +You can now properly edit permission groups when you have full access diff --git a/src/graphql/hooks.generated.ts b/src/graphql/hooks.generated.ts index 888d474f1df..ff5b956b404 100644 --- a/src/graphql/hooks.generated.ts +++ b/src/graphql/hooks.generated.ts @@ -13181,7 +13181,7 @@ export const PermissionGroupDetailsDocument = gql` permissionGroup(id: $id) { ...PermissionGroupDetails } - user(id: $userId) { + user: me { editableGroups { id } diff --git a/src/permissionGroups/queries.ts b/src/permissionGroups/queries.ts index 4c486ea11c9..69330de08db 100644 --- a/src/permissionGroups/queries.ts +++ b/src/permissionGroups/queries.ts @@ -34,7 +34,7 @@ export const permissionGroupDetailsQuery = gql` permissionGroup(id: $id) { ...PermissionGroupDetails } - user(id: $userId) { + user: me { editableGroups { id }