aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-07 17:18:29 +0200
committerChocobozzz <me@florianbigard.com>2022-09-08 08:41:48 +0200
commitd4d9bbc6f24522f5d63b0ab105a02f80ca98d702 (patch)
tree9e7e5e5170cea36a489f6c988df892a34c886937 /server/controllers/api/users
parent8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea (diff)
downloadPeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.gz
PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.zst
PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.zip
Fix channel sync right check
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