From 9eee32fc34ece1cc5e624ae15d81bfede68be33f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 May 2017 14:11:01 +0200 Subject: Client: fix update button displayed on non owned video --- client/src/app/videos/video-watch/video-watch.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'client/src/app/videos/video-watch') 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 07b2a1d1f..756f66726 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -229,8 +229,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } canUserUpdateVideo() { - return this.authService.getUser() !== null && - this.authService.getUser().username === this.video.author; + return this.video.isUpdatableBy(this.authService.getUser()); } isVideoRemovable() { -- cgit v1.2.3