aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config/config.routes.ts
blob: 2ca2f8fdeadd2f94608a10c68e0170db83d09c96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Routes } from '@angular/router'
import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config'
import { UserRightGuard } from '@app/core'
import { UserRight } from '../../../../../shared/models/users'
import { ConfigComponent } from './config.component'

export const ConfigRoutes: Routes = [
  {
    path: 'config',
    component: ConfigComponent,
    canActivate: [ UserRightGuard ],
    data: {
      userRight: UserRight.MANAGE_CONFIGURATION
    },
    children: [
      {
        path: '',
        redirectTo: 'edit-custom',
        pathMatch: 'full'
      },
      {
        path: 'edit-custom',
        component: EditCustomConfigComponent,
        data: {
          meta: {
            title: 'Edit custom configuration'
          }
        }
      }
    ]
  }
]