]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/moderation.routes.ts
factorize account/server blocklists for users and instance (#2875)
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
CommitLineData
614d1ae9
C
1import { Routes } from '@angular/router'
2import { UserRight } from '../../../../../shared'
3import { UserRightGuard } from '@app/core'
4import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
5baee5fc 5import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
614d1ae9 6import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
65b21c96 7import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
614d1ae9
C
8
9export const ModerationRoutes: Routes = [
10 {
11 path: 'moderation',
12 component: ModerationComponent,
13 children: [
14 {
15 path: '',
16 redirectTo: 'video-abuses/list',
17 pathMatch: 'full'
18 },
ad76628b
C
19 {
20 path: 'video-abuses',
21 redirectTo: 'video-abuses/list',
22 pathMatch: 'full'
23 },
614d1ae9
C
24 {
25 path: 'video-abuses/list',
26 component: VideoAbuseListComponent,
27 canActivate: [ UserRightGuard ],
28 data: {
29 userRight: UserRight.MANAGE_VIDEO_ABUSES,
30 meta: {
5baee5fc 31 title: 'Video reports'
614d1ae9
C
32 }
33 }
34 },
5baee5fc
RK
35 {
36 path: 'video-blacklist',
37 redirectTo: 'video-blocks/list',
38 pathMatch: 'full'
39 },
40 {
41 path: 'video-auto-blacklist',
42 redirectTo: 'video-blocks/list',
43 pathMatch: 'full'
44 },
7ccddd7b
JM
45 {
46 path: 'video-auto-blacklist/list',
5baee5fc
RK
47 redirectTo: 'video-blocks/list',
48 pathMatch: 'full'
49 },
50 {
51 path: 'video-blacklist',
52 redirectTo: 'video-blocks/list',
53 pathMatch: 'full'
7ccddd7b 54 },
614d1ae9 55 {
5baee5fc
RK
56 path: 'video-blocks/list',
57 component: VideoBlockListComponent,
614d1ae9
C
58 canActivate: [ UserRightGuard ],
59 data: {
3487330d 60 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
614d1ae9 61 meta: {
5baee5fc 62 title: 'Videos blocked'
614d1ae9
C
63 }
64 }
65b21c96
C
65 },
66 {
67 path: 'blocklist/accounts',
68 component: InstanceAccountBlocklistComponent,
69 canActivate: [ UserRightGuard ],
70 data: {
71 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
72 meta: {
73 title: 'Muted accounts'
74 }
75 }
76 },
77 {
78 path: 'blocklist/servers',
79 component: InstanceServerBlocklistComponent,
80 canActivate: [ UserRightGuard ],
81 data: {
72be63e5 82 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
65b21c96
C
83 meta: {
84 title: 'Muted instances'
85 }
86 }
614d1ae9
C
87 }
88 ]
89 }
90]