From d4d9bbc6f24522f5d63b0ab105a02f80ca98d702 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Sep 2022 17:18:29 +0200 Subject: Fix channel sync right check --- server/controllers/api/users/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/controllers/api/users/index.ts') diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index 7761ba602..0b27d5277 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts @@ -36,7 +36,7 @@ import { usersUpdateValidator } from '../../../middlewares' import { - ensureCanManageUser, + ensureCanModerateUser, usersAskResetPasswordValidator, usersAskSendVerifyEmailValidator, usersBlockingValidator, @@ -95,14 +95,14 @@ usersRouter.post('/:id/block', authenticate, ensureUserHasRight(UserRight.MANAGE_USERS), asyncMiddleware(usersBlockingValidator), - ensureCanManageUser, + ensureCanModerateUser, asyncMiddleware(blockUser) ) usersRouter.post('/:id/unblock', authenticate, ensureUserHasRight(UserRight.MANAGE_USERS), asyncMiddleware(usersBlockingValidator), - ensureCanManageUser, + ensureCanModerateUser, asyncMiddleware(unblockUser) ) @@ -132,7 +132,7 @@ usersRouter.put('/:id', authenticate, ensureUserHasRight(UserRight.MANAGE_USERS), asyncMiddleware(usersUpdateValidator), - ensureCanManageUser, + ensureCanModerateUser, asyncMiddleware(updateUser) ) @@ -140,7 +140,7 @@ usersRouter.delete('/:id', authenticate, ensureUserHasRight(UserRight.MANAGE_USERS), asyncMiddleware(usersRemoveValidator), - ensureCanManageUser, + ensureCanModerateUser, asyncMiddleware(removeUser) ) -- cgit v1.2.3