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