diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-27 09:36:37 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-10-29 11:48:21 +0200 |
commit | 00004f7f6b966a975498612117212b5373f4103c (patch) | |
tree | 4899b77da3c55bf1fbb77f927d9da5cd873e2c2a /client/src/app/+admin/overview/users/users.routes.ts | |
parent | bd898dd76babf6ab33a0040297bfb40a69a69dda (diff) | |
download | PeerTube-00004f7f6b966a975498612117212b5373f4103c.tar.gz PeerTube-00004f7f6b966a975498612117212b5373f4103c.tar.zst PeerTube-00004f7f6b966a975498612117212b5373f4103c.zip |
Put admin users in overview tab
Diffstat (limited to 'client/src/app/+admin/overview/users/users.routes.ts')
-rw-r--r-- | client/src/app/+admin/overview/users/users.routes.ts | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/client/src/app/+admin/overview/users/users.routes.ts b/client/src/app/+admin/overview/users/users.routes.ts new file mode 100644 index 000000000..8b63f5bc7 --- /dev/null +++ b/client/src/app/+admin/overview/users/users.routes.ts | |||
@@ -0,0 +1,49 @@ | |||
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 | |||
7 | export const UsersRoutes: Routes = [ | ||
8 | { | ||
9 | path: 'users', | ||
10 | canActivate: [ UserRightGuard ], | ||
11 | data: { | ||
12 | userRight: UserRight.MANAGE_USERS | ||
13 | }, | ||
14 | children: [ | ||
15 | { | ||
16 | path: '', | ||
17 | redirectTo: 'list', | ||
18 | pathMatch: 'full' | ||
19 | }, | ||
20 | { | ||
21 | path: 'list', | ||
22 | component: UserListComponent, | ||
23 | data: { | ||
24 | meta: { | ||
25 | title: $localize`Users list` | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | { | ||
30 | path: 'create', | ||
31 | component: UserCreateComponent, | ||
32 | data: { | ||
33 | meta: { | ||
34 | title: $localize`Create a user` | ||
35 | } | ||
36 | } | ||
37 | }, | ||
38 | { | ||
39 | path: 'update/:id', | ||
40 | component: UserUpdateComponent, | ||
41 | data: { | ||
42 | meta: { | ||
43 | title: $localize`Update a user` | ||
44 | } | ||
45 | } | ||
46 | } | ||
47 | ] | ||
48 | } | ||
49 | ] | ||