X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fvideos%2Fshared%2Fvideo.model.ts;h=fafdb4ac4b114548f0692f42b0aee32bd0f5a610;hb=9eee32fc34ece1cc5e624ae15d81bfede68be33f;hp=1cfb312b6efb0007693df6f3459bd5edaf16ce27;hpb=b1ed221747d6829232d2311c11e4fd26faa43c4f;p=github%2FChocobozzz%2FPeerTube.git 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));