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 { VideoBlockListComponent } from '@app/+admin/moderation/video-block-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-abuses/list',
26 component: VideoAbuseListComponent,
27 canActivate: [ UserRightGuard ],
29 userRight: UserRight.MANAGE_VIDEO_ABUSES,
31 title: 'Video reports'
36 path: 'video-blacklist',
37 redirectTo: 'video-blocks/list',
41 path: 'video-auto-blacklist',
42 redirectTo: 'video-blocks/list',
46 path: 'video-auto-blacklist/list',
47 redirectTo: 'video-blocks/list',
51 path: 'video-blacklist',
52 redirectTo: 'video-blocks/list',
56 path: 'video-blocks/list',
57 component: VideoBlockListComponent,
58 canActivate: [ UserRightGuard ],
60 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
62 title: 'Videos blocked'
67 path: 'blocklist/accounts',
68 component: InstanceAccountBlocklistComponent,
69 canActivate: [ UserRightGuard ],
71 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
73 title: 'Muted accounts'
78 path: 'blocklist/servers',
79 component: InstanceServerBlocklistComponent,
80 canActivate: [ UserRightGuard ],
82 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
84 title: 'Muted instances'