diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 12:39:49 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 12:39:49 +0100 |
commit | 8fd66b75bfbd8fd4945f1944411461b05eb74795 (patch) | |
tree | 4c9ab93e9b851c749edfa63d042ef51b7dceafc8 /server/middlewares/validators/videos.js | |
parent | efe923bcdaf15b47593ad8583df09a92c715ac6c (diff) | |
download | PeerTube-8fd66b75bfbd8fd4945f1944411461b05eb74795.tar.gz PeerTube-8fd66b75bfbd8fd4945f1944411461b05eb74795.tar.zst PeerTube-8fd66b75bfbd8fd4945f1944411461b05eb74795.zip |
Server: fix video remoe validation
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r-- | server/middlewares/validators/videos.js | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
78 | return res.status(403).send('Cannot remove video of another pod') | 78 | return res.status(403).send('Cannot remove video of another pod') |
79 | } | 79 | } |
80 | 80 | ||
81 | if (res.locals.video.authorId !== res.locals.oauth.token.User.id) { | 81 | if (res.locals.video.Author.userId !== res.locals.oauth.token.User.id) { |
82 | return res.status(403).send('Cannot remove video of another user') | 82 | return res.status(403).send('Cannot remove video of another user') |
83 | } | 83 | } |
84 | 84 | ||