From: Chocobozzz Date: Fri, 30 Dec 2016 11:39:49 +0000 (+0100) Subject: Server: fix video remoe validation X-Git-Tag: v0.0.1-alpha~574^2~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8fd66b75bfbd8fd4945f1944411461b05eb74795;p=oweals%2Fpeertube.git Server: fix video remoe validation --- diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js index 1b6dbccf0..295ed05fa 100644 --- a/server/middlewares/validators/videos.js +++ b/server/middlewares/validators/videos.js @@ -78,7 +78,7 @@ function videosRemove (req, res, next) { return res.status(403).send('Cannot remove video of another pod') } - if (res.locals.video.authorId !== res.locals.oauth.token.User.id) { + if (res.locals.video.Author.userId !== res.locals.oauth.token.User.id) { return res.status(403).send('Cannot remove video of another user') }