aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index e1c775180..1cbefc3e5 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -41,6 +41,7 @@ import {
41 asyncMiddleware, 41 asyncMiddleware,
42 asyncRetryTransactionMiddleware, 42 asyncRetryTransactionMiddleware,
43 authenticate, 43 authenticate,
44 ensureUserHasRight,
44 checkVideoFollowConstraints, 45 checkVideoFollowConstraints,
45 commonVideosFiltersValidator, 46 commonVideosFiltersValidator,
46 optionalAuthenticate, 47 optionalAuthenticate,
@@ -56,6 +57,7 @@ import {
56 videosUpdateValidator 57 videosUpdateValidator
57} from '../../../middlewares' 58} from '../../../middlewares'
58import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' 59import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update'
60import { UserRight } from '../../../../shared'
59import { VideoModel } from '../../../models/video/video' 61import { VideoModel } from '../../../models/video/video'
60import { VideoFileModel } from '../../../models/video/video-file' 62import { VideoFileModel } from '../../../models/video/video-file'
61import { blacklistRouter } from './blacklist' 63import { blacklistRouter } from './blacklist'
@@ -146,6 +148,7 @@ videosRouter.post('/:id/views',
146 148
147videosRouter.delete('/:id', 149videosRouter.delete('/:id',
148 authenticate, 150 authenticate,
151 ensureUserHasRight(UserRight.REMOVE_ANY_VIDEO),
149 asyncMiddleware(videosRemoveValidator), 152 asyncMiddleware(videosRemoveValidator),
150 asyncRetryTransactionMiddleware(removeVideo) 153 asyncRetryTransactionMiddleware(removeVideo)
151) 154)