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