]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - 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
CommitLineData
df98563e 1import { Routes } from '@angular/router'
7da18e44 2
954605a8
C
3import { UserRightGuard } from '../../core'
4import { UserRight } from '../../../../../shared'
df98563e 5import { UsersComponent } from './users.component'
4c200caa 6import { UserCreateComponent, UserUpdateComponent } from './user-edit'
df98563e 7import { UserListComponent } from './user-list'
7da18e44 8
ab32b0fc 9export const UsersRoutes: Routes = [
7da18e44 10 {
1f0215a9
C
11 path: 'users',
12 component: UsersComponent,
954605a8
C
13 canActivate: [ UserRightGuard ],
14 data: {
15 userRight: UserRight.MANAGE_USERS
16 },
1f0215a9
C
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'
b58c69a1 29 }
1f0215a9
C
30 }
31 },
32 {
4c200caa
C
33 path: 'create',
34 component: UserCreateComponent,
1f0215a9
C
35 data: {
36 meta: {
4c200caa 37 title: 'Create a user'
b58c69a1 38 }
7da18e44 39 }
8094a898
C
40 },
41 {
9b9b1805 42 path: 'update/:id',
8094a898
C
43 component: UserUpdateComponent,
44 data: {
45 meta: {
46 title: 'Update a user'
47 }
48 }
1f0215a9
C
49 }
50 ]
51 }
df98563e 52]