Implement authentication feature with role-based access control and login dialog
This commit is contained in:
@@ -7,10 +7,11 @@ import { MainComponent } from './main/main.component';
|
||||
import { ScheduleComponent } from './schedule/schedule.component';
|
||||
import { TheaterOverlayComponent} from './theater-overlay/theater-overlay.component';
|
||||
import { MovieImporterComponent } from './movie-importer/movie-importer.component';
|
||||
import { AuthGuard } from './auth.guard';
|
||||
|
||||
const routes: Routes = [
|
||||
// Seiten ohne Layout
|
||||
{ path: 'info', component: HomeComponent },
|
||||
{ path: 'landing', component: HomeComponent },
|
||||
{ path: 'poc-model', component: PocModelComponent },
|
||||
|
||||
// Seiten mit MainLayout
|
||||
@@ -20,8 +21,13 @@ const routes: Routes = [
|
||||
children: [
|
||||
{ path: '', component: MainComponent },
|
||||
{ path: 'schedule', component: ScheduleComponent },
|
||||
{ path: 'admin/movie-importer', component: MovieImporterComponent },
|
||||
{ path: 'selection/performance/:id', component: TheaterOverlayComponent}, //?
|
||||
{
|
||||
path: 'admin/movie-importer',
|
||||
component: MovieImporterComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
|
||||
},
|
||||
{ path: 'selection/performance/:id', component: TheaterOverlayComponent},
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user