]>
Commit | Line | Data |
---|---|---|
614d1ae9 C |
1 | import { Routes } from '@angular/router' |
2 | import { UserRight } from '../../../../../shared' | |
3 | import { UserRightGuard } from '@app/core' | |
4 | import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list' | |
5 | import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list' | |
6 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' | |
65b21c96 | 7 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
614d1ae9 C |
8 | |
9 | export 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 | }, | |
24 | { | |
25 | path: 'video-blacklist', | |
26 | redirectTo: 'video-blacklist/list', | |
27 | pathMatch: 'full' | |
28 | }, | |
614d1ae9 C |
29 | { |
30 | path: 'video-abuses/list', | |
31 | component: VideoAbuseListComponent, | |
32 | canActivate: [ UserRightGuard ], | |
33 | data: { | |
34 | userRight: UserRight.MANAGE_VIDEO_ABUSES, | |
35 | meta: { | |
36 | title: 'Video abuses list' | |
37 | } | |
38 | } | |
39 | }, | |
40 | { | |
41 | path: 'video-blacklist/list', | |
42 | component: VideoBlacklistListComponent, | |
43 | canActivate: [ UserRightGuard ], | |
44 | data: { | |
45 | userRight: UserRight.MANAGE_VIDEO_BLACKLIST, | |
46 | meta: { | |
47 | title: 'Blacklisted videos' | |
48 | } | |
49 | } | |
65b21c96 C |
50 | }, |
51 | { | |
52 | path: 'blocklist/accounts', | |
53 | component: InstanceAccountBlocklistComponent, | |
54 | canActivate: [ UserRightGuard ], | |
55 | data: { | |
56 | userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, | |
57 | meta: { | |
58 | title: 'Muted accounts' | |
59 | } | |
60 | } | |
61 | }, | |
62 | { | |
63 | path: 'blocklist/servers', | |
64 | component: InstanceServerBlocklistComponent, | |
65 | canActivate: [ UserRightGuard ], | |
66 | data: { | |
67 | userRight: UserRight.MANAGE_SERVER_REDUNDANCY, | |
68 | meta: { | |
69 | title: 'Muted instances' | |
70 | } | |
71 | } | |
614d1ae9 C |
72 | } |
73 | ] | |
74 | } | |
75 | ] |