1 import { Routes } from '@angular/router'
2 import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
3 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
5 import { UserRightGuard } from '@app/core'
6 import { UserRight } from '@shared/models'
7 import { RegistrationListComponent } from './registration-list'
9 export const ModerationRoutes: Routes = [
15 redirectTo: 'abuses/list',
20 redirectTo: 'abuses/list',
24 path: 'video-abuses/list',
25 redirectTo: 'abuses/list',
30 component: AbuseListComponent,
31 canActivate: [ UserRightGuard ],
33 userRight: UserRight.MANAGE_ABUSES,
35 title: $localize`Reports`
41 path: 'video-blacklist',
42 redirectTo: 'video-blocks/list',
46 path: 'video-auto-blacklist',
47 redirectTo: 'video-blocks/list',
51 path: 'video-auto-blacklist/list',
52 redirectTo: 'video-blocks/list',
56 path: 'video-blacklist',
57 redirectTo: 'video-blocks/list',
61 path: 'video-blocks/list',
62 component: VideoBlockListComponent,
63 canActivate: [ UserRightGuard ],
65 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
67 title: $localize`Blocked videos`
73 path: 'registrations/list',
74 component: RegistrationListComponent,
75 canActivate: [ UserRightGuard ],
77 userRight: UserRight.MANAGE_REGISTRATIONS,
79 title: $localize`User registrations`
84 // We moved this component in admin overview pages
86 path: 'video-comments',
87 redirectTo: 'video-comments/list',
91 path: 'video-comments/list',
92 redirectTo: '/admin/comments/list',
97 path: 'blocklist/accounts',
98 component: InstanceAccountBlocklistComponent,
99 canActivate: [ UserRightGuard ],
101 userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
103 title: $localize`Muted accounts`
108 path: 'blocklist/servers',
109 component: InstanceServerBlocklistComponent,
110 canActivate: [ UserRightGuard ],
112 userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
114 title: $localize`Muted instances`