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); }