From 98afcf3b40a53cad632d648aabe6193a300a90b4 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Thu, 19 Dec 2024 10:54:04 +0100 Subject: [PATCH] permission update permission update to admin for permission change at user and role --- src/routes/admin/role.ts | 2 +- src/routes/admin/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/admin/role.ts b/src/routes/admin/role.ts index ac3c077..4f50b7c 100644 --- a/src/routes/admin/role.ts +++ b/src/routes/admin/role.ts @@ -42,7 +42,7 @@ router.patch( router.patch( "/:id/permissions", - PermissionHelper.passCheckMiddleware("update", "user", "role"), + PermissionHelper.passCheckMiddleware("admin", "user", "role"), async (req: Request, res: Response) => { await updateRolePermissions(req, res); } diff --git a/src/routes/admin/user.ts b/src/routes/admin/user.ts index 8bfd44b..6c774cd 100644 --- a/src/routes/admin/user.ts +++ b/src/routes/admin/user.ts @@ -40,7 +40,7 @@ router.patch( router.patch( "/:id/permissions", - PermissionHelper.passCheckMiddleware("update", "user", "user"), + PermissionHelper.passCheckMiddleware("admin", "user", "user"), async (req: Request, res: Response) => { await updateUserPermissions(req, res); }