2018-07-23 16:42:17 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
2019-07-26 11:46:59 +02:00
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
2019-01-31 13:40:27 +01:00
|
|
|
import { AuthGuard } from '../core/core-services/auth-guard.service';
|
2019-07-26 11:46:59 +02:00
|
|
|
import { SiteComponent } from './site.component';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Routung to all OpenSlides apps
|
|
|
|
*
|
|
|
|
* TODO: Plugins will have to append to the Routes-Array
|
|
|
|
*/
|
|
|
|
const routes: Routes = [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: SiteComponent,
|
|
|
|
children: [
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: '',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./common/os-common.module').then(m => m.OsCommonModule)
|
2018-09-06 07:14:55 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'agenda',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./agenda/agenda.module').then(m => m.AgendaModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'agenda.can_see' }
|
2018-09-06 07:14:55 +02:00
|
|
|
},
|
2019-06-17 14:27:47 +02:00
|
|
|
{
|
|
|
|
path: 'topics',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./topics/topics.module').then(m => m.TopicsModule),
|
2019-06-17 14:27:47 +02:00
|
|
|
data: { basePerm: 'agenda.can_see' }
|
|
|
|
},
|
2018-07-31 15:46:55 +02:00
|
|
|
{
|
|
|
|
path: 'assignments',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./assignments/assignments.module').then(m => m.AssignmentsModule),
|
2019-04-08 10:32:18 +02:00
|
|
|
data: { basePerm: 'assignments.can_see' }
|
2018-07-31 15:46:55 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'mediafiles',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./mediafiles/mediafiles.module').then(m => m.MediafilesModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'mediafiles.can_see' }
|
2018-07-31 15:46:55 +02:00
|
|
|
},
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: 'motions',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./motions/motions.module').then(m => m.MotionsModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'motions.can_see' }
|
2018-09-06 07:14:55 +02:00
|
|
|
},
|
2018-07-31 15:46:55 +02:00
|
|
|
{
|
|
|
|
path: 'settings',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./config/config.module').then(m => m.ConfigModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'core.can_manage_config' }
|
2018-07-31 15:46:55 +02:00
|
|
|
},
|
2018-09-06 07:14:55 +02:00
|
|
|
{
|
|
|
|
path: 'users',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./users/users.module').then(m => m.UsersModule)
|
2019-05-24 13:35:00 +02:00
|
|
|
// No baseperm, because change own password is ok, even if the
|
|
|
|
// user does not have users.can_see_name
|
2018-10-15 10:12:47 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'tags',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./tags/tag.module').then(m => m.TagModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'core.can_manage_tags' }
|
2018-11-09 13:44:39 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'history',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./history/history.module').then(m => m.HistoryModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'core.can_see_history' }
|
2019-01-10 15:06:10 +01:00
|
|
|
},
|
|
|
|
{
|
2019-01-24 16:25:50 +01:00
|
|
|
path: 'projectors',
|
2019-07-01 11:23:33 +02:00
|
|
|
loadChildren: () => import('./projector/projector.module').then(m => m.ProjectorModule),
|
2019-04-05 12:33:34 +02:00
|
|
|
data: { basePerm: 'core.can_see_projector' }
|
2018-09-06 07:14:55 +02:00
|
|
|
}
|
2018-08-28 11:07:10 +02:00
|
|
|
],
|
|
|
|
canActivateChild: [AuthGuard]
|
2018-07-23 16:42:17 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class SiteRoutingModule {}
|