diff options
Diffstat (limited to 'client/src/app')
3 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index c757a5e93..2b56d5064 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -239,7 +239,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
239 | } | 239 | } |
240 | 240 | ||
241 | isVideoDownloadable () { | 241 | isVideoDownloadable () { |
242 | return this.video && this.video instanceof VideoDetails && this.video.downloadEnabled && !this.video.isLive | 242 | return this.video && this.video instanceof VideoDetails && this.video.isDownloadableBy(this.user) && !this.video.isLive |
243 | } | 243 | } |
244 | 244 | ||
245 | loadCompleteDescription () { | 245 | loadCompleteDescription () { |
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index d51dfbc6d..fb00c11ff 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -179,6 +179,10 @@ export class Video implements VideoServerModel { | |||
179 | return serverConfig.instance.defaultNSFWPolicy !== 'display' | 179 | return serverConfig.instance.defaultNSFWPolicy !== 'display' |
180 | } | 180 | } |
181 | 181 | ||
182 | isDownloadableBy (user: AuthUser) { | ||
183 | return user && this.isLocal === true && user.hasRight(UserRight.SEE_ALL_VIDEOS) | ||
184 | } | ||
185 | |||
182 | isRemovableBy (user: AuthUser) { | 186 | isRemovableBy (user: AuthUser) { |
183 | return user && this.isLocal === true && user.hasRight(UserRight.REMOVE_ANY_VIDEO) | 187 | return user && this.isLocal === true && user.hasRight(UserRight.REMOVE_ANY_VIDEO) |
184 | } | 188 | } |
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index 3c2b46d16..2bc9bf7e4 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts | |||
@@ -163,7 +163,7 @@ export class VideoActionsDropdownComponent implements OnChanges { | |||
163 | return this.video && | 163 | return this.video && |
164 | this.video.isLive !== true && | 164 | this.video.isLive !== true && |
165 | this.video instanceof VideoDetails && | 165 | this.video instanceof VideoDetails && |
166 | this.video.downloadEnabled | 166 | this.video.isDownloadableBy(this.user) |
167 | } | 167 | } |
168 | 168 | ||
169 | canVideoBeDuplicated () { | 169 | canVideoBeDuplicated () { |