aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-19 09:53:49 +0200
committerChocobozzz <me@florianbigard.com>2018-09-19 09:54:38 +0200
commitad76628b17ff8f25d3402d6d669b274116bbf76c (patch)
tree6f6a4f499bbf7a1b8114954ec8d8a6275a20aaee /client/src/app
parent627621c1e8d37c33f7b3dd59f4c8907b12c630bc (diff)
downloadPeerTube-ad76628b17ff8f25d3402d6d669b274116bbf76c.tar.gz
PeerTube-ad76628b17ff8f25d3402d6d669b274116bbf76c.tar.zst
PeerTube-ad76628b17ff8f25d3402d6d669b274116bbf76c.zip
Fix admin access to moderators
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+admin/moderation/moderation.routes.ts10
-rw-r--r--client/src/app/menu/menu.component.ts10
2 files changed, 17 insertions, 3 deletions
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
index b133152d9..6d81b9b36 100644
--- a/client/src/app/+admin/moderation/moderation.routes.ts
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -16,6 +16,16 @@ export const ModerationRoutes: Routes = [
16 pathMatch: 'full' 16 pathMatch: 'full'
17 }, 17 },
18 { 18 {
19 path: 'video-abuses',
20 redirectTo: 'video-abuses/list',
21 pathMatch: 'full'
22 },
23 {
24 path: 'video-blacklist',
25 redirectTo: 'video-blacklist/list',
26 pathMatch: 'full'
27 },
28 {
19 path: 'video-abuses/list', 29 path: 'video-abuses/list',
20 component: VideoAbuseListComponent, 30 component: VideoAbuseListComponent,
21 canActivate: [ UserRightGuard ], 31 canActivate: [ UserRightGuard ],
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 24cd5aa28..f13ecc2c7 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -19,8 +19,10 @@ export class MenuComponent implements OnInit {
19 private routesPerRight = { 19 private routesPerRight = {
20 [UserRight.MANAGE_USERS]: '/admin/users', 20 [UserRight.MANAGE_USERS]: '/admin/users',
21 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', 21 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
22 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/video-abuses', 22 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses',
23 [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/video-blacklist' 23 [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/moderation/video-blacklist',
24 [UserRight.MANAGE_JOBS]: '/admin/jobs',
25 [UserRight.MANAGE_CONFIGURATION]: '/admin/config'
24 } 26 }
25 27
26 constructor ( 28 constructor (
@@ -67,7 +69,9 @@ export class MenuComponent implements OnInit {
67 UserRight.MANAGE_USERS, 69 UserRight.MANAGE_USERS,
68 UserRight.MANAGE_SERVER_FOLLOW, 70 UserRight.MANAGE_SERVER_FOLLOW,
69 UserRight.MANAGE_VIDEO_ABUSES, 71 UserRight.MANAGE_VIDEO_ABUSES,
70 UserRight.MANAGE_VIDEO_BLACKLIST 72 UserRight.MANAGE_VIDEO_BLACKLIST,
73 UserRight.MANAGE_JOBS,
74 UserRight.MANAGE_CONFIGURATION
71 ] 75 ]
72 76
73 for (const adminRight of adminRights) { 77 for (const adminRight of adminRights) {