]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-watch/video-watch.component.ts
Client: fix update button displayed on non owned video
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-watch / video-watch.component.ts
index 07b2a1d1f30736f80823c0683500901bef2ef8dc..756f667269e56fb459394e7086025face2a73889 100644 (file)
@@ -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() {