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'
7 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
9 export const ModerationRoutes: Routes = [
12 component: ModerationComponent,
16 redirectTo: 'video-abuses/list',
21 redirectTo: 'video-abuses/list',
25 path: 'video-blacklist',
26 redirectTo: 'video-blacklist/list',
30 path: 'video-abuses/list',
31 component: VideoAbuseListComponent,
32 canActivate: [ UserRightGuard ],
34 userRight: UserRight.MANAGE_VIDEO_ABUSES,
36 title: 'Video abuses list'
41 path: 'video-blacklist/list',
42 component: VideoBlacklistListComponent,
43 canActivate: [ UserRightGuard ],
45 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
47 title: 'Blacklisted videos'
52 path: 'blocklist/accounts',
53 component: InstanceAccountBlocklistComponent,
54 canActivate: [ UserRightGuard ],
56 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
58 title: 'Muted accounts'
63 path: 'blocklist/servers',
64 component: InstanceServerBlocklistComponent,
65 canActivate: [ UserRightGuard ],
67 userRight: UserRight.MANAGE_SERVER_REDUNDANCY,
69 title: 'Muted instances'