diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-05 14:11:01 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-05 14:11:01 +0200 |
commit | 9eee32fc34ece1cc5e624ae15d81bfede68be33f (patch) | |
tree | 51490553777779572d2adfa7c5f1c117defbedce /client/src/app/videos/shared | |
parent | b1ed221747d6829232d2311c11e4fd26faa43c4f (diff) | |
download | PeerTube-9eee32fc34ece1cc5e624ae15d81bfede68be33f.tar.gz PeerTube-9eee32fc34ece1cc5e624ae15d81bfede68be33f.tar.zst PeerTube-9eee32fc34ece1cc5e624ae15d81bfede68be33f.zip |
Client: fix update button displayed on non owned video
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/video.model.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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 { | |||
93 | return user && user.isAdmin() === true && this.isLocal === false; | 93 | return user && user.isAdmin() === true && this.isLocal === false; |
94 | } | 94 | } |
95 | 95 | ||
96 | isUpdatableBy(user) { | ||
97 | return user && this.isLocal === true && user.username === this.author; | ||
98 | } | ||
99 | |||
96 | isVideoNSFWForUser(user: User) { | 100 | isVideoNSFWForUser(user: User) { |
97 | // If the video is NSFW and the user is not logged in, or the user does not want to display NSFW videos... | 101 | // If the video is NSFW and the user is not logged in, or the user does not want to display NSFW videos... |
98 | return (this.nsfw && (!user || user.displayNSFW === false)); | 102 | return (this.nsfw && (!user || user.displayNSFW === false)); |