]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/users/users.routes.ts
Cleanup lives on server restart
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / users.routes.ts
1 import { Routes } from '@angular/router'
2 import { ServerConfigResolver, UserRightGuard } from '@app/core'
3 import { UserRight } from '@shared/models'
4 import { UserCreateComponent, UserUpdateComponent } from './user-edit'
5 import { UserListComponent } from './user-list'
6 import { UsersComponent } from './users.component'
7
8 export const UsersRoutes: Routes = [
9 {
10 path: 'users',
11 component: UsersComponent,
12 canActivate: [ UserRightGuard ],
13 data: {
14 userRight: UserRight.MANAGE_USERS
15 },
16 children: [
17 {
18 path: '',
19 redirectTo: 'list',
20 pathMatch: 'full'
21 },
22 {
23 path: 'list',
24 component: UserListComponent,
25 data: {
26 meta: {
27 title: $localize`Users list`
28 }
29 }
30 },
31 {
32 path: 'create',
33 component: UserCreateComponent,
34 data: {
35 meta: {
36 title: $localize`Create a user`
37 }
38 },
39 resolve: {
40 serverConfig: ServerConfigResolver
41 }
42 },
43 {
44 path: 'update/:id',
45 component: UserUpdateComponent,
46 data: {
47 meta: {
48 title: $localize`Update a user`
49 }
50 }
51 }
52 ]
53 }
54 ]