aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r--server/controllers/api/users/index.ts10
1 files changed, 5 insertions, 5 deletions
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 {
36 usersUpdateValidator 36 usersUpdateValidator
37} from '../../../middlewares' 37} from '../../../middlewares'
38import { 38import {
39 ensureCanManageUser, 39 ensureCanModerateUser,
40 usersAskResetPasswordValidator, 40 usersAskResetPasswordValidator,
41 usersAskSendVerifyEmailValidator, 41 usersAskSendVerifyEmailValidator,
42 usersBlockingValidator, 42 usersBlockingValidator,
@@ -95,14 +95,14 @@ usersRouter.post('/:id/block',
95 authenticate, 95 authenticate,
96 ensureUserHasRight(UserRight.MANAGE_USERS), 96 ensureUserHasRight(UserRight.MANAGE_USERS),
97 asyncMiddleware(usersBlockingValidator), 97 asyncMiddleware(usersBlockingValidator),
98 ensureCanManageUser, 98 ensureCanModerateUser,
99 asyncMiddleware(blockUser) 99 asyncMiddleware(blockUser)
100) 100)
101usersRouter.post('/:id/unblock', 101usersRouter.post('/:id/unblock',
102 authenticate, 102 authenticate,
103 ensureUserHasRight(UserRight.MANAGE_USERS), 103 ensureUserHasRight(UserRight.MANAGE_USERS),
104 asyncMiddleware(usersBlockingValidator), 104 asyncMiddleware(usersBlockingValidator),
105 ensureCanManageUser, 105 ensureCanModerateUser,
106 asyncMiddleware(unblockUser) 106 asyncMiddleware(unblockUser)
107) 107)
108 108
@@ -132,7 +132,7 @@ usersRouter.put('/:id',
132 authenticate, 132 authenticate,
133 ensureUserHasRight(UserRight.MANAGE_USERS), 133 ensureUserHasRight(UserRight.MANAGE_USERS),
134 asyncMiddleware(usersUpdateValidator), 134 asyncMiddleware(usersUpdateValidator),
135 ensureCanManageUser, 135 ensureCanModerateUser,
136 asyncMiddleware(updateUser) 136 asyncMiddleware(updateUser)
137) 137)
138 138
@@ -140,7 +140,7 @@ usersRouter.delete('/:id',
140 authenticate, 140 authenticate,
141 ensureUserHasRight(UserRight.MANAGE_USERS), 141 ensureUserHasRight(UserRight.MANAGE_USERS),
142 asyncMiddleware(usersRemoveValidator), 142 asyncMiddleware(usersRemoveValidator),
143 ensureCanManageUser, 143 ensureCanModerateUser,
144 asyncMiddleware(removeUser) 144 asyncMiddleware(removeUser)
145) 145)
146 146