aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/videos.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index ff90e347a..efab67a01 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -429,7 +429,10 @@ const commonVideosFiltersValidator = [
429 if (areValidationErrors(req, res)) return 429 if (areValidationErrors(req, res)) return
430 430
431 const user = res.locals.oauth ? res.locals.oauth.token.User : undefined 431 const user = res.locals.oauth ? res.locals.oauth.token.User : undefined
432 if (req.query.filter === 'all-local' && (!user || user.hasRight(UserRight.SEE_ALL_VIDEOS) === false)) { 432 if (
433 (req.query.filter === 'all-local' || req.query.filter === 'all') &&
434 (!user || user.hasRight(UserRight.SEE_ALL_VIDEOS) === false)
435 ) {
433 res.status(401) 436 res.status(401)
434 .json({ error: 'You are not allowed to see all local videos.' }) 437 .json({ error: 'You are not allowed to see all local videos.' })
435 438