Fix admin access to moderators
authorChocobozzz <me@florianbigard.com>
Wed, 19 Sep 2018 07:53:49 +0000 (09:53 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 19 Sep 2018 07:54:38 +0000 (09:54 +0200)
client/src/app/+admin/moderation/moderation.routes.ts
client/src/app/menu/menu.component.ts

index b133152d9089d22a26291b68f519a727aafa7915..6d81b9b363149da288cae5f8837e3f07570a6751 100644 (file)
@@ -15,6 +15,16 @@ export const ModerationRoutes: Routes = [
         redirectTo: 'video-abuses/list',
         pathMatch: 'full'
       },
+      {
+        path: 'video-abuses',
+        redirectTo: 'video-abuses/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-blacklist',
+        redirectTo: 'video-blacklist/list',
+        pathMatch: 'full'
+      },
       {
         path: 'video-abuses/list',
         component: VideoAbuseListComponent,
index 24cd5aa28225ad4710a49ede2855d7673f3bfb8a..f13ecc2c7be8bc85fae47a2dcc8d676d3aba8691 100644 (file)
@@ -19,8 +19,10 @@ export class MenuComponent implements OnInit {
   private routesPerRight = {
     [UserRight.MANAGE_USERS]: '/admin/users',
     [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
-    [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/video-abuses',
-    [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/video-blacklist'
+    [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses',
+    [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/moderation/video-blacklist',
+    [UserRight.MANAGE_JOBS]: '/admin/jobs',
+    [UserRight.MANAGE_CONFIGURATION]: '/admin/config'
   }
 
   constructor (
@@ -67,7 +69,9 @@ export class MenuComponent implements OnInit {
       UserRight.MANAGE_USERS,
       UserRight.MANAGE_SERVER_FOLLOW,
       UserRight.MANAGE_VIDEO_ABUSES,
-      UserRight.MANAGE_VIDEO_BLACKLIST
+      UserRight.MANAGE_VIDEO_BLACKLIST,
+      UserRight.MANAGE_JOBS,
+      UserRight.MANAGE_CONFIGURATION
     ]
 
     for (const adminRight of adminRights) {