diff options
Diffstat (limited to 'client/src/app')
16 files changed, 37 insertions, 37 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index 4cf3da0e8..a97a33cf5 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts | |||
@@ -37,7 +37,7 @@ export class AdminComponent implements OnInit { | |||
37 | } | 37 | } |
38 | 38 | ||
39 | hasVideoBlocklistRight () { | 39 | hasVideoBlocklistRight () { |
40 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLOCKS) | 40 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) |
41 | } | 41 | } |
42 | 42 | ||
43 | hasConfigRight () { | 43 | hasConfigRight () { |
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index d48305eed..1b1df6f09 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts | |||
@@ -25,7 +25,7 @@ export class ModerationComponent implements OnInit { | |||
25 | } | 25 | } |
26 | 26 | ||
27 | hasVideoBlocklistRight () { | 27 | hasVideoBlocklistRight () { |
28 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLOCKS) | 28 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) |
29 | } | 29 | } |
30 | 30 | ||
31 | hasAccountsBlocklistRight () { | 31 | hasAccountsBlocklistRight () { |
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts index aeb555c4a..c08333f17 100644 --- a/client/src/app/+admin/moderation/moderation.routes.ts +++ b/client/src/app/+admin/moderation/moderation.routes.ts | |||
@@ -57,7 +57,7 @@ export const ModerationRoutes: Routes = [ | |||
57 | component: VideoBlockListComponent, | 57 | component: VideoBlockListComponent, |
58 | canActivate: [ UserRightGuard ], | 58 | canActivate: [ UserRightGuard ], |
59 | data: { | 59 | data: { |
60 | userRight: UserRight.MANAGE_VIDEO_BLOCKS, | 60 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, |
61 | meta: { | 61 | meta: { |
62 | title: 'Videos blocked' | 62 | title: 'Videos blocked' |
63 | } | 63 | } |
diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts index ca37bccf3..a36acc2ab 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts | |||
@@ -107,7 +107,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV | |||
107 | this.videoBlocklistService.blockVideo(videoAbuse.video.id, undefined, true) | 107 | this.videoBlocklistService.blockVideo(videoAbuse.video.id, undefined, true) |
108 | .subscribe( | 108 | .subscribe( |
109 | () => { | 109 | () => { |
110 | this.notifier.success(this.i18n('Video blocklisted.')) | 110 | this.notifier.success(this.i18n('Video blocked.')) |
111 | 111 | ||
112 | this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) | 112 | this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) |
113 | }, | 113 | }, |
@@ -123,7 +123,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV | |||
123 | this.videoBlocklistService.unblockVideo(videoAbuse.video.id) | 123 | this.videoBlocklistService.unblockVideo(videoAbuse.video.id) |
124 | .subscribe( | 124 | .subscribe( |
125 | () => { | 125 | () => { |
126 | this.notifier.success(this.i18n('Video unblocklisted.')) | 126 | this.notifier.success(this.i18n('Video unblocked.')) |
127 | 127 | ||
128 | this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) | 128 | this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) |
129 | }, | 129 | }, |
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts index e72ab5348..7b3691332 100644 --- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts +++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts | |||
@@ -3,7 +3,7 @@ import { SortMeta } from 'primeng/api' | |||
3 | import { Notifier, ServerService } from '@app/core' | 3 | import { Notifier, ServerService } from '@app/core' |
4 | import { ConfirmService } from '../../../core' | 4 | import { ConfirmService } from '../../../core' |
5 | import { RestPagination, RestTable, VideoBlockService } from '../../../shared' | 5 | import { RestPagination, RestTable, VideoBlockService } from '../../../shared' |
6 | import { VideoBlocklist, VideoBlockType } from '../../../../../../shared' | 6 | import { VideoBlacklist, VideoBlacklistType } from '../../../../../../shared' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' | 8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' |
9 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
@@ -18,13 +18,13 @@ import { VideoService } from '@app/shared/video/video.service' | |||
18 | styleUrls: [ '../moderation.component.scss', './video-block-list.component.scss' ] | 18 | styleUrls: [ '../moderation.component.scss', './video-block-list.component.scss' ] |
19 | }) | 19 | }) |
20 | export class VideoBlockListComponent extends RestTable implements OnInit { | 20 | export class VideoBlockListComponent extends RestTable implements OnInit { |
21 | blocklist: (VideoBlocklist & { reasonHtml?: string })[] = [] | 21 | blocklist: (VideoBlacklist & { reasonHtml?: string })[] = [] |
22 | totalRecords = 0 | 22 | totalRecords = 0 |
23 | sort: SortMeta = { field: 'createdAt', order: -1 } | 23 | sort: SortMeta = { field: 'createdAt', order: -1 } |
24 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } | 24 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } |
25 | listBlockTypeFilter: VideoBlockType = undefined | 25 | blocklistTypeFilter: VideoBlacklistType = undefined |
26 | 26 | ||
27 | videoBlocklistActions: DropdownAction<VideoBlocklist>[][] = [] | 27 | videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = [] |
28 | 28 | ||
29 | constructor ( | 29 | constructor ( |
30 | private notifier: Notifier, | 30 | private notifier: Notifier, |
@@ -99,7 +99,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit { | |||
99 | .subscribe(config => { | 99 | .subscribe(config => { |
100 | // don't filter if auto-blacklist is not enabled as this will be the only list | 100 | // don't filter if auto-blacklist is not enabled as this will be the only list |
101 | if (config.autoBlacklist.videos.ofUsers.enabled) { | 101 | if (config.autoBlacklist.videos.ofUsers.enabled) { |
102 | this.listBlockTypeFilter = VideoBlockType.MANUAL | 102 | this.blocklistTypeFilter = VideoBlacklistType.MANUAL |
103 | } | 103 | } |
104 | }) | 104 | }) |
105 | 105 | ||
@@ -141,7 +141,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit { | |||
141 | return 'VideoBlockListComponent' | 141 | return 'VideoBlockListComponent' |
142 | } | 142 | } |
143 | 143 | ||
144 | getVideoUrl (videoBlock: VideoBlocklist) { | 144 | getVideoUrl (videoBlock: VideoBlacklist) { |
145 | return Video.buildClientUrl(videoBlock.video.uuid) | 145 | return Video.buildClientUrl(videoBlock.video.uuid) |
146 | } | 146 | } |
147 | 147 | ||
@@ -155,7 +155,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit { | |||
155 | return this.markdownRenderer.textMarkdownToHTML(text) | 155 | return this.markdownRenderer.textMarkdownToHTML(text) |
156 | } | 156 | } |
157 | 157 | ||
158 | async unblockVideo (entry: VideoBlocklist) { | 158 | async unblockVideo (entry: VideoBlacklist) { |
159 | const confirmMessage = this.i18n( | 159 | const confirmMessage = this.i18n( |
160 | 'Do you really want to unblock this video? It will be available again in the videos list.' | 160 | 'Do you really want to unblock this video? It will be available again in the videos list.' |
161 | ) | 161 | ) |
diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts index a394418cb..b459eb8fa 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/users/user-edit/user-create.component.ts | |||
@@ -52,7 +52,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { | |||
52 | role: this.userValidatorsService.USER_ROLE, | 52 | role: this.userValidatorsService.USER_ROLE, |
53 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, | 53 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, |
54 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, | 54 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, |
55 | byPassAutoBlacklist: null | 55 | byPassAutoBlock: null |
56 | }, defaultValues) | 56 | }, defaultValues) |
57 | } | 57 | } |
58 | 58 | ||
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html index d30a606d6..0454df7b7 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/users/user-edit/user-edit.component.html | |||
@@ -164,7 +164,7 @@ | |||
164 | 164 | ||
165 | <div class="form-group"> | 165 | <div class="form-group"> |
166 | <my-peertube-checkbox | 166 | <my-peertube-checkbox |
167 | inputName="byPassAutoBlacklist" formControlName="byPassAutoBlacklist" | 167 | inputName="byPassAutoBlock" formControlName="byPassAutoBlock" |
168 | i18n-labelText labelText="Doesn't need review before a video goes public" | 168 | i18n-labelText labelText="Doesn't need review before a video goes public" |
169 | ></my-peertube-checkbox> | 169 | ></my-peertube-checkbox> |
170 | </div> | 170 | </div> |
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts index 98249bcc1..5f5cc590c 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -88,7 +88,7 @@ export abstract class UserEdit extends FormReactive implements OnInit { | |||
88 | } | 88 | } |
89 | 89 | ||
90 | protected buildAdminFlags (formValue: any) { | 90 | protected buildAdminFlags (formValue: any) { |
91 | return formValue.byPassAutoBlacklist ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK : UserAdminFlag.NONE | 91 | return formValue.byPassAutoBlock ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST : UserAdminFlag.NONE |
92 | } | 92 | } |
93 | 93 | ||
94 | protected buildQuotaOptions () { | 94 | protected buildQuotaOptions () { |
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index f2bd8c8ec..035c0d4bb 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts | |||
@@ -56,7 +56,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
56 | role: this.userValidatorsService.USER_ROLE, | 56 | role: this.userValidatorsService.USER_ROLE, |
57 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, | 57 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, |
58 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, | 58 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, |
59 | byPassAutoBlacklist: null | 59 | byPassAutoBlock: null |
60 | }, defaultValues) | 60 | }, defaultValues) |
61 | 61 | ||
62 | this.paramsSub = this.route.params.subscribe(routeParams => { | 62 | this.paramsSub = this.route.params.subscribe(routeParams => { |
@@ -125,7 +125,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
125 | role: userJson.role.toString(), | 125 | role: userJson.role.toString(), |
126 | videoQuota: userJson.videoQuota, | 126 | videoQuota: userJson.videoQuota, |
127 | videoQuotaDaily: userJson.videoQuotaDaily, | 127 | videoQuotaDaily: userJson.videoQuotaDaily, |
128 | byPassAutoBlacklist: userJson.adminFlags & UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK | 128 | byPassAutoBlock: userJson.adminFlags & UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST |
129 | }) | 129 | }) |
130 | } | 130 | } |
131 | } | 131 | } |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts index 72e26ac28..af17a0352 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts | |||
@@ -49,7 +49,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { | |||
49 | 49 | ||
50 | this.rightNotifications = { | 50 | this.rightNotifications = { |
51 | videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES, | 51 | videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES, |
52 | videoAutoBlacklistAsModerator: UserRight.MANAGE_VIDEO_BLOCKS, | 52 | videoAutoBlacklistAsModerator: UserRight.MANAGE_VIDEO_BLACKLIST, |
53 | newUserRegistration: UserRight.MANAGE_USERS, | 53 | newUserRegistration: UserRight.MANAGE_USERS, |
54 | newInstanceFollower: UserRight.MANAGE_SERVER_FOLLOW, | 54 | newInstanceFollower: UserRight.MANAGE_SERVER_FOLLOW, |
55 | autoInstanceFollowing: UserRight.MANAGE_CONFIGURATION | 55 | autoInstanceFollowing: UserRight.MANAGE_CONFIGURATION |
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 79bf29e9c..ba3342541 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -33,7 +33,7 @@ export class MenuComponent implements OnInit { | |||
33 | [UserRight.MANAGE_USERS]: '/admin/users', | 33 | [UserRight.MANAGE_USERS]: '/admin/users', |
34 | [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', | 34 | [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', |
35 | [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses', | 35 | [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses', |
36 | [UserRight.MANAGE_VIDEO_BLOCKS]: '/admin/moderation/video-blocks', | 36 | [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/moderation/video-blocks', |
37 | [UserRight.MANAGE_JOBS]: '/admin/jobs', | 37 | [UserRight.MANAGE_JOBS]: '/admin/jobs', |
38 | [UserRight.MANAGE_CONFIGURATION]: '/admin/config' | 38 | [UserRight.MANAGE_CONFIGURATION]: '/admin/config' |
39 | } | 39 | } |
@@ -131,7 +131,7 @@ export class MenuComponent implements OnInit { | |||
131 | UserRight.MANAGE_USERS, | 131 | UserRight.MANAGE_USERS, |
132 | UserRight.MANAGE_SERVER_FOLLOW, | 132 | UserRight.MANAGE_SERVER_FOLLOW, |
133 | UserRight.MANAGE_VIDEO_ABUSES, | 133 | UserRight.MANAGE_VIDEO_ABUSES, |
134 | UserRight.MANAGE_VIDEO_BLOCKS, | 134 | UserRight.MANAGE_VIDEO_BLACKLIST, |
135 | UserRight.MANAGE_JOBS, | 135 | UserRight.MANAGE_JOBS, |
136 | UserRight.MANAGE_CONFIGURATION | 136 | UserRight.MANAGE_CONFIGURATION |
137 | ] | 137 | ] |
diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts index bc1861c64..7b8368d87 100644 --- a/client/src/app/shared/users/user-notification.model.ts +++ b/client/src/app/shared/users/user-notification.model.ts | |||
@@ -96,7 +96,7 @@ export class UserNotification implements UserNotificationServer { | |||
96 | this.videoUrl = this.buildVideoUrl(this.video) | 96 | this.videoUrl = this.buildVideoUrl(this.video) |
97 | break | 97 | break |
98 | 98 | ||
99 | case UserNotificationType.UNBLOCK_ON_MY_VIDEO: | 99 | case UserNotificationType.UNBLACKLIST_ON_MY_VIDEO: |
100 | this.videoUrl = this.buildVideoUrl(this.video) | 100 | this.videoUrl = this.buildVideoUrl(this.video) |
101 | break | 101 | break |
102 | 102 | ||
@@ -112,7 +112,7 @@ export class UserNotification implements UserNotificationServer { | |||
112 | this.videoUrl = this.buildVideoUrl(this.videoAbuse.video) | 112 | this.videoUrl = this.buildVideoUrl(this.videoAbuse.video) |
113 | break | 113 | break |
114 | 114 | ||
115 | case UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS: | 115 | case UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS: |
116 | this.videoAutoBlacklistUrl = '/admin/moderation/video-auto-blacklist/list' | 116 | this.videoAutoBlacklistUrl = '/admin/moderation/video-auto-blacklist/list' |
117 | // Backward compatibility where we did not assign videoBlacklist to this type of notification before | 117 | // Backward compatibility where we did not assign videoBlacklist to this type of notification before |
118 | if (!this.videoBlacklist) this.videoBlacklist = { id: null, video: this.video } | 118 | if (!this.videoBlacklist) this.videoBlacklist = { id: null, video: this.video } |
@@ -120,7 +120,7 @@ export class UserNotification implements UserNotificationServer { | |||
120 | this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) | 120 | this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) |
121 | break | 121 | break |
122 | 122 | ||
123 | case UserNotificationType.BLOCK_ON_MY_VIDEO: | 123 | case UserNotificationType.BLACKLIST_ON_MY_VIDEO: |
124 | this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) | 124 | this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) |
125 | break | 125 | break |
126 | 126 | ||
diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html index 5a102995a..c6037f0a9 100644 --- a/client/src/app/shared/users/user-notifications.component.html +++ b/client/src/app/shared/users/user-notifications.component.html | |||
@@ -26,7 +26,7 @@ | |||
26 | </ng-template> | 26 | </ng-template> |
27 | </ng-container> | 27 | </ng-container> |
28 | 28 | ||
29 | <ng-container *ngSwitchCase="UserNotificationType.UNBLOCK_ON_MY_VIDEO"> | 29 | <ng-container *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO"> |
30 | <my-global-icon iconName="undo"></my-global-icon> | 30 | <my-global-icon iconName="undo"></my-global-icon> |
31 | 31 | ||
32 | <div class="message" i18n> | 32 | <div class="message" i18n> |
@@ -34,7 +34,7 @@ | |||
34 | </div> | 34 | </div> |
35 | </ng-container> | 35 | </ng-container> |
36 | 36 | ||
37 | <ng-container *ngSwitchCase="UserNotificationType.BLOCK_ON_MY_VIDEO"> | 37 | <ng-container *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO"> |
38 | <my-global-icon iconName="no"></my-global-icon> | 38 | <my-global-icon iconName="no"></my-global-icon> |
39 | 39 | ||
40 | <div class="message" i18n> | 40 | <div class="message" i18n> |
@@ -50,11 +50,11 @@ | |||
50 | </div> | 50 | </div> |
51 | </ng-container> | 51 | </ng-container> |
52 | 52 | ||
53 | <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS"> | 53 | <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS"> |
54 | <my-global-icon iconName="no"></my-global-icon> | 54 | <my-global-icon iconName="no"></my-global-icon> |
55 | 55 | ||
56 | <div class="message" i18n> | 56 | <div class="message" i18n> |
57 | The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">auto-blocked</a> | 57 | The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">automatically blocked</a> |
58 | </div> | 58 | </div> |
59 | </ng-container> | 59 | </ng-container> |
60 | 60 | ||
diff --git a/client/src/app/shared/video-block/video-block.service.ts b/client/src/app/shared/video-block/video-block.service.ts index 67ca1d85b..31ccc84ea 100644 --- a/client/src/app/shared/video-block/video-block.service.ts +++ b/client/src/app/shared/video-block/video-block.service.ts | |||
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http' | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { SortMeta } from 'primeng/api' | 4 | import { SortMeta } from 'primeng/api' |
5 | import { from as observableFrom, Observable } from 'rxjs' | 5 | import { from as observableFrom, Observable } from 'rxjs' |
6 | import { VideoBlocklist, VideoBlockType, ResultList } from '../../../../../shared' | 6 | import { VideoBlacklist, VideoBlacklistType, ResultList } from '../../../../../shared' |
7 | import { environment } from '../../../environments/environment' | 7 | import { environment } from '../../../environments/environment' |
8 | import { RestExtractor, RestPagination, RestService } from '../rest' | 8 | import { RestExtractor, RestPagination, RestService } from '../rest' |
9 | 9 | ||
@@ -21,8 +21,8 @@ export class VideoBlockService { | |||
21 | pagination: RestPagination | 21 | pagination: RestPagination |
22 | sort: SortMeta | 22 | sort: SortMeta |
23 | search?: string | 23 | search?: string |
24 | type?: VideoBlockType | 24 | type?: VideoBlacklistType |
25 | }): Observable<ResultList<VideoBlocklist>> { | 25 | }): Observable<ResultList<VideoBlacklist>> { |
26 | const { pagination, sort, search, type } = options | 26 | const { pagination, sort, search, type } = options |
27 | 27 | ||
28 | let params = new HttpParams() | 28 | let params = new HttpParams() |
@@ -33,8 +33,8 @@ export class VideoBlockService { | |||
33 | type: { | 33 | type: { |
34 | prefix: 'type:', | 34 | prefix: 'type:', |
35 | handler: v => { | 35 | handler: v => { |
36 | if (v === 'manual') return VideoBlockType.MANUAL | 36 | if (v === 'manual') return VideoBlacklistType.MANUAL |
37 | if (v === 'auto') return VideoBlockType.AUTO_BEFORE_PUBLISHED | 37 | if (v === 'auto') return VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
38 | 38 | ||
39 | return undefined | 39 | return undefined |
40 | } | 40 | } |
@@ -44,7 +44,7 @@ export class VideoBlockService { | |||
44 | params = this.restService.addObjectParams(params, filters) | 44 | params = this.restService.addObjectParams(params, filters) |
45 | } | 45 | } |
46 | 46 | ||
47 | return this.authHttp.get<ResultList<VideoBlocklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params }) | 47 | return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params }) |
48 | .pipe( | 48 | .pipe( |
49 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | 49 | map(res => this.restExtractor.convertResultListDateToHuman(res)), |
50 | catchError(res => this.restExtractor.handleError(res)) | 50 | catchError(res => this.restExtractor.handleError(res)) |
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index 2b3d915ef..16e43cbd8 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -164,11 +164,11 @@ export class Video implements VideoServerModel { | |||
164 | } | 164 | } |
165 | 165 | ||
166 | isBlockableBy (user: AuthUser) { | 166 | isBlockableBy (user: AuthUser) { |
167 | return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true | 167 | return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true |
168 | } | 168 | } |
169 | 169 | ||
170 | isUnblockableBy (user: AuthUser) { | 170 | isUnblockableBy (user: AuthUser) { |
171 | return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true | 171 | return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true |
172 | } | 172 | } |
173 | 173 | ||
174 | isUpdatableBy (user: AuthUser) { | 174 | isUpdatableBy (user: AuthUser) { |
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 9f726cf35..df0c1058c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -335,7 +335,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
335 | this.videoCaptionService.listCaptions(videoId) | 335 | this.videoCaptionService.listCaptions(videoId) |
336 | ]) | 336 | ]) |
337 | .pipe( | 337 | .pipe( |
338 | // If 401, the video is private or blocklisted so redirect to 404 | 338 | // If 401, the video is private or blocked so redirect to 404 |
339 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ])) | 339 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ])) |
340 | ) | 340 | ) |
341 | .subscribe(([ video, captionsResult ]) => { | 341 | .subscribe(([ video, captionsResult ]) => { |
@@ -364,7 +364,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
364 | 364 | ||
365 | this.playlistService.getVideoPlaylist(playlistId) | 365 | this.playlistService.getVideoPlaylist(playlistId) |
366 | .pipe( | 366 | .pipe( |
367 | // If 401, the video is private or blocklisted so redirect to 404 | 367 | // If 401, the video is private or blocked so redirect to 404 |
368 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ])) | 368 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 401, 403, 404 ])) |
369 | ) | 369 | ) |
370 | .subscribe(playlist => { | 370 | .subscribe(playlist => { |