]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/users/users.routes.ts
Merge branch 'release/3.3.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / users.routes.ts
1 import { Routes } from '@angular/router'
2 import { 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 },
40 {
41 path: 'update/:id',
42 component: UserUpdateComponent,
43 data: {
44 meta: {
45 title: $localize`Update a user`
46 }
47 }
48 }
49 ]
50 }
51 ]