From cefdc5e9ec08eefdf4305a084be9600659790449 Mon Sep 17 00:00:00 2001 From: Cassio Santos Date: Mon, 14 Mar 2022 12:14:26 -0300 Subject: [PATCH] fix: revert bugged PR --- backend/src/controllers/UserController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/controllers/UserController.ts b/backend/src/controllers/UserController.ts index 55e9d99..001d97b 100644 --- a/backend/src/controllers/UserController.ts +++ b/backend/src/controllers/UserController.ts @@ -68,7 +68,7 @@ export const update = async ( req: Request, res: Response ): Promise => { - if (req.user.profile !== "admin" && sessionUserId !== "user") { + if (req.user.profile !== "admin") { throw new AppError("ERR_NO_PERMISSION", 403); }