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 { VideoAutoBlacklistListComponent } from '@app/+admin/moderation/video-auto-blacklist-list'
7 import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
8 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
10 export const ModerationRoutes: Routes = [
13 component: ModerationComponent,
17 redirectTo: 'video-abuses/list',
22 redirectTo: 'video-abuses/list',
26 path: 'video-blacklist',
27 redirectTo: 'video-blacklist/list',
31 path: 'video-auto-blacklist',
32 redirectTo: 'video-auto-blacklist/list',
36 path: 'video-abuses/list',
37 component: VideoAbuseListComponent,
38 canActivate: [ UserRightGuard ],
40 userRight: UserRight.MANAGE_VIDEO_ABUSES,
42 title: 'Video abuses list'
47 path: 'video-auto-blacklist/list',
48 component: VideoAutoBlacklistListComponent,
49 canActivate: [ UserRightGuard ],
51 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
53 title: 'Auto-blacklisted videos'
58 path: 'video-blacklist/list',
59 component: VideoBlacklistListComponent,
60 canActivate: [ UserRightGuard ],
62 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
64 title: 'Blacklisted videos'
69 path: 'blocklist/accounts',
70 component: InstanceAccountBlocklistComponent,
71 canActivate: [ UserRightGuard ],
73 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
75 title: 'Muted accounts'
80 path: 'blocklist/servers',
81 component: InstanceServerBlocklistComponent,
82 canActivate: [ UserRightGuard ],
84 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
86 title: 'Muted instances'