Fix missing MANAGE APPS permission when using client provided in context (#663)
* Fix using wrong token for creating gql client * Update gorgeous-hats-learn.md
This commit is contained in:
parent
e239fbb670
commit
59ff617282
4 changed files with 11 additions and 3 deletions
8
.changeset/gorgeous-hats-learn.md
Normal file
8
.changeset/gorgeous-hats-learn.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
"saleor-app-emails-and-messages": patch
|
||||
"saleor-app-invoices": patch
|
||||
"saleor-app-crm": patch
|
||||
---
|
||||
|
||||
Fixed "Not enough permissions" error during configuration management.
|
||||
|
|
@ -109,7 +109,7 @@ export const protectedClientProcedure = procedure
|
|||
.use(async ({ ctx, next }) => {
|
||||
const client = createGraphQLClient({
|
||||
saleorApiUrl: ctx.saleorApiUrl,
|
||||
token: ctx.token,
|
||||
token: ctx.appToken,
|
||||
});
|
||||
|
||||
return next({
|
||||
|
|
|
@ -104,7 +104,7 @@ export const protectedClientProcedure = procedure
|
|||
.use(attachAppToken)
|
||||
.use(validateClientToken)
|
||||
.use(async ({ ctx, next }) => {
|
||||
const client = createGraphQLClient({ saleorApiUrl: ctx.saleorApiUrl, token: ctx.token });
|
||||
const client = createGraphQLClient({ saleorApiUrl: ctx.saleorApiUrl, token: ctx.appToken });
|
||||
|
||||
return next({
|
||||
ctx: {
|
||||
|
|
|
@ -104,7 +104,7 @@ export const protectedClientProcedure = procedure
|
|||
.use(async ({ ctx, next }) => {
|
||||
const client = createGraphQLClient({
|
||||
saleorApiUrl: ctx.saleorApiUrl,
|
||||
token: ctx.token,
|
||||
token: ctx.appToken,
|
||||
});
|
||||
|
||||
return next({
|
||||
|
|
Loading…
Reference in a new issue