Skip to content

Commit

Permalink
fix: remove role check in user enable and disable graphql resolver (#611
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rameshlohala committed Feb 12, 2024
1 parent 431e4c5 commit 2d84f4b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/user/src/model/users/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ const Mutation = {
return mercuriusError;
}

if (context.roles === undefined || !context.roles.includes(ROLE_ADMIN)) {
return new mercurius.ErrorWithProps(`User is not an admin`, {}, 403);
}

const service = new Service(
context.config,
context.database,
Expand All @@ -156,10 +152,6 @@ const Mutation = {
) => {
const { id } = arguments_;

if (context.roles === undefined || !context.roles.includes(ROLE_ADMIN)) {
return new mercurius.ErrorWithProps(`User is not an admin`, {}, 403);
}

const service = new Service(
context.config,
context.database,
Expand Down

0 comments on commit 2d84f4b

Please sign in to comment.