From 0aa52e170727ac6bdf441bcaa2353ae0b8a354ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Nov 2020 15:29:38 +0100 Subject: Add ability to display all channel/account videos --- server/middlewares/validators/videos/videos.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/middlewares') 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 = [ if (areValidationErrors(req, res)) return const user = res.locals.oauth ? res.locals.oauth.token.User : undefined - if (req.query.filter === 'all-local' && (!user || user.hasRight(UserRight.SEE_ALL_VIDEOS) === false)) { + if ( + (req.query.filter === 'all-local' || req.query.filter === 'all') && + (!user || user.hasRight(UserRight.SEE_ALL_VIDEOS) === false) + ) { res.status(401) .json({ error: 'You are not allowed to see all local videos.' }) -- cgit v1.2.3