aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/shared/video-details.model.ts14
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts2
2 files changed, 9 insertions, 7 deletions
diff --git a/client/src/app/videos/shared/video-details.model.ts b/client/src/app/videos/shared/video-details.model.ts
index e99a5ce2e..3a6ecc480 100644
--- a/client/src/app/videos/shared/video-details.model.ts
+++ b/client/src/app/videos/shared/video-details.model.ts
@@ -1,9 +1,11 @@
1import { Video } from './video.model' 1import { Video } from './video.model'
2import { AuthUser } from '../../core'
2import { 3import {
3 VideoDetails as VideoDetailsServerModel, 4 VideoDetails as VideoDetailsServerModel,
4 VideoFile, 5 VideoFile,
5 VideoChannel, 6 VideoChannel,
6 VideoResolution 7 VideoResolution,
8 UserRight
7} from '../../../../../shared' 9} from '../../../../../shared'
8 10
9export class VideoDetails extends Video implements VideoDetailsServerModel { 11export class VideoDetails extends Video implements VideoDetailsServerModel {
@@ -61,15 +63,15 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
61 return betterResolutionFile.magnetUri 63 return betterResolutionFile.magnetUri
62 } 64 }
63 65
64 isRemovableBy (user) { 66 isRemovableBy (user: AuthUser) {
65 return user && this.isLocal === true && (this.author === user.username || user.isAdmin() === true) 67 return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
66 } 68 }
67 69
68 isBlackistableBy (user) { 70 isBlackistableBy (user: AuthUser) {
69 return user && user.isAdmin() === true && this.isLocal === false 71 return user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true && this.isLocal === false
70 } 72 }
71 73
72 isUpdatableBy (user) { 74 isUpdatableBy (user: AuthUser) {
73 return user && this.isLocal === true && user.username === this.author 75 return user && this.isLocal === true && user.username === this.author
74 } 76 }
75} 77}
diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts
index 35a7b6521..bf6f60215 100644
--- a/client/src/app/videos/video-list/video-list.component.ts
+++ b/client/src/app/videos/video-list/video-list.component.ts
@@ -12,7 +12,7 @@ import {
12 VideoService, 12 VideoService,
13 VideoPagination 13 VideoPagination
14} from '../shared' 14} from '../shared'
15import { Search, SearchField, SearchService, User} from '../../shared' 15import { Search, SearchField, SearchService, User } from '../../shared'
16 16
17@Component({ 17@Component({
18 selector: 'my-videos-list', 18 selector: 'my-videos-list',