Fix admin access to moderators

pull/1093/head
Chocobozzz 2018-09-19 09:53:49 +02:00
parent 627621c1e8
commit ad76628b17
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 17 additions and 3 deletions

View 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,

View 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) {