diff options
Diffstat (limited to 'client/src/app/videos/video-watch/video-watch.component.ts')
-rw-r--r-- | client/src/app/videos/video-watch/video-watch.component.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index 37ed70a99..e04626a67 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts | |||
@@ -187,6 +187,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
187 | return this.authService.isLoggedIn(); | 187 | return this.authService.isLoggedIn(); |
188 | } | 188 | } |
189 | 189 | ||
190 | canUserUpdateVideo() { | ||
191 | return this.authService.getUser() !== null && | ||
192 | this.authService.getUser().username === this.video.author; | ||
193 | } | ||
194 | |||
190 | private checkUserRating() { | 195 | private checkUserRating() { |
191 | // Unlogged users do not have ratings | 196 | // Unlogged users do not have ratings |
192 | if (this.isUserLoggedIn() === false) return; | 197 | if (this.isUserLoggedIn() === false) return; |