aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-comment.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-21 09:01:39 +0200
committerChocobozzz <me@florianbigard.com>2020-04-21 09:01:39 +0200
commit68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a (patch)
tree81fa180f180f2cc3a2a7ec665a568acc8df3ce57 /server/models/video/video-comment.ts
parentb3af2601da92a6c0835cb2473b4c7a41a0d86e98 (diff)
downloadPeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.tar.gz
PeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.tar.zst
PeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.zip
Don't leak unlisted videos in comments feed
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r--server/models/video/video-comment.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index b33c33d5e..aedd7a3a9 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -27,6 +27,7 @@ import {
27 MCommentOwnerVideoReply 27 MCommentOwnerVideoReply
28} from '../../typings/models/video' 28} from '../../typings/models/video'
29import { MUserAccountId } from '@server/typings/models' 29import { MUserAccountId } from '@server/typings/models'
30import { VideoPrivacy } from '@shared/models'
30 31
31enum ScopeNames { 32enum ScopeNames {
32 WITH_ACCOUNT = 'WITH_ACCOUNT', 33 WITH_ACCOUNT = 'WITH_ACCOUNT',
@@ -390,7 +391,10 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
390 { 391 {
391 attributes: [ 'name', 'uuid' ], 392 attributes: [ 'name', 'uuid' ],
392 model: VideoModel.unscoped(), 393 model: VideoModel.unscoped(),
393 required: true 394 required: true,
395 where: {
396 privacy: VideoPrivacy.PUBLIC
397 }
394 } 398 }
395 ] 399 ]
396 } 400 }