mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 12:49:32 +00:00
Merge pull request #402 from Kouthk/patch-2
🧯 Permite ao perfil 'user' trocar a propria senha.
This commit is contained in:
@@ -68,7 +68,7 @@ export const update = async (
|
|||||||
req: Request,
|
req: Request,
|
||||||
res: Response
|
res: Response
|
||||||
): Promise<Response> => {
|
): Promise<Response> => {
|
||||||
if (req.user.profile !== "admin") {
|
if (req.user.profile !== "admin" && sessionUserId !== "user") {
|
||||||
throw new AppError("ERR_NO_PERMISSION", 403);
|
throw new AppError("ERR_NO_PERMISSION", 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user