]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/shared/video.model.ts
Client: fix update button displayed on non owned video
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / shared / video.model.ts
index 1cfb312b6efb0007693df6f3459bd5edaf16ce27..fafdb4ac4b114548f0692f42b0aee32bd0f5a610 100644 (file)
@@ -93,6 +93,10 @@ export class Video {
     return user && user.isAdmin() === true && this.isLocal === false;
   }
 
+  isUpdatableBy(user) {
+    return user && this.isLocal === true && user.username === this.author;
+  }
+
   isVideoNSFWForUser(user: User) {
     // If the video is NSFW and the user is not logged in, or the user does not want to display NSFW videos...
     return (this.nsfw && (!user || user.displayNSFW === false));