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/shared/video.model.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/src/app/videos/shared') diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts index 1cfb312b6..fafdb4ac4 100644 --- a/client/src/app/videos/shared/video.model.ts +++ b/client/src/app/videos/shared/video.model.ts @@ -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)); -- cgit v1.2.3