permission update
permission update to admin for permission change at user and role
This commit is contained in:
parent
d102512c98
commit
98afcf3b40
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ router.patch(
|
||||||
|
|
||||||
router.patch(
|
router.patch(
|
||||||
"/:id/permissions",
|
"/:id/permissions",
|
||||||
PermissionHelper.passCheckMiddleware("update", "user", "role"),
|
PermissionHelper.passCheckMiddleware("admin", "user", "role"),
|
||||||
async (req: Request, res: Response) => {
|
async (req: Request, res: Response) => {
|
||||||
await updateRolePermissions(req, res);
|
await updateRolePermissions(req, res);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ router.patch(
|
||||||
|
|
||||||
router.patch(
|
router.patch(
|
||||||
"/:id/permissions",
|
"/:id/permissions",
|
||||||
PermissionHelper.passCheckMiddleware("update", "user", "user"),
|
PermissionHelper.passCheckMiddleware("admin", "user", "user"),
|
||||||
async (req: Request, res: Response) => {
|
async (req: Request, res: Response) => {
|
||||||
await updateUserPermissions(req, res);
|
await updateUserPermissions(req, res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue