frontend: Update base routes to include room creator guard and disabled component
This commit is contained in:
parent
ecf70639f7
commit
558fba500a
@ -1,6 +1,6 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
|
|
||||||
import { UnauthorizedComponent } from '../components';
|
import { UnauthorizedComponent, RoomCreatorDisabledComponent } from '../components';
|
||||||
import {
|
import {
|
||||||
checkUserAuthenticatedGuard,
|
checkUserAuthenticatedGuard,
|
||||||
checkUserNotAuthenticatedGuard,
|
checkUserNotAuthenticatedGuard,
|
||||||
@ -8,7 +8,8 @@ import {
|
|||||||
applicationModeGuard,
|
applicationModeGuard,
|
||||||
extractQueryParamsGuard,
|
extractQueryParamsGuard,
|
||||||
checkParticipantNameGuard,
|
checkParticipantNameGuard,
|
||||||
replaceModeratorSecretGuard
|
replaceModeratorSecretGuard,
|
||||||
|
checkRoomCreatorEnabledGuard
|
||||||
} from '../guards';
|
} from '../guards';
|
||||||
import {
|
import {
|
||||||
AboutComponent,
|
AboutComponent,
|
||||||
@ -18,6 +19,7 @@ import {
|
|||||||
ConsoleLoginComponent,
|
ConsoleLoginComponent,
|
||||||
DisconnectedComponent,
|
DisconnectedComponent,
|
||||||
RoomCreatorComponent,
|
RoomCreatorComponent,
|
||||||
|
LoginComponent,
|
||||||
OverviewComponent,
|
OverviewComponent,
|
||||||
ParticipantNameFormComponent,
|
ParticipantNameFormComponent,
|
||||||
RecordingsComponent,
|
RecordingsComponent,
|
||||||
@ -26,14 +28,13 @@ import {
|
|||||||
VideoRoomComponent,
|
VideoRoomComponent,
|
||||||
RoomFormComponent
|
RoomFormComponent
|
||||||
} from '../pages';
|
} from '../pages';
|
||||||
import { LoginComponent } from '@lib/pages/login/login.component';
|
|
||||||
import { UserRole } from '@lib/typings/ce';
|
import { UserRole } from '@lib/typings/ce';
|
||||||
|
|
||||||
export const baseRoutes: Routes = [
|
export const baseRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: RoomCreatorComponent,
|
component: RoomCreatorComponent,
|
||||||
canActivate: [checkUserAuthenticatedGuard],
|
canActivate: [checkRoomCreatorEnabledGuard, checkUserAuthenticatedGuard],
|
||||||
data: {
|
data: {
|
||||||
expectedRoles: [UserRole.USER],
|
expectedRoles: [UserRole.USER],
|
||||||
redirectToUnauthorized: 'login',
|
redirectToUnauthorized: 'login',
|
||||||
@ -46,6 +47,7 @@ export const baseRoutes: Routes = [
|
|||||||
canActivate: [checkUserNotAuthenticatedGuard],
|
canActivate: [checkUserNotAuthenticatedGuard],
|
||||||
data: { redirectTo: '' }
|
data: { redirectTo: '' }
|
||||||
},
|
},
|
||||||
|
{ path: 'room-creator-disabled', component: RoomCreatorDisabledComponent },
|
||||||
{ path: 'disconnected', component: DisconnectedComponent },
|
{ path: 'disconnected', component: DisconnectedComponent },
|
||||||
{ path: 'unauthorized', component: UnauthorizedComponent },
|
{ path: 'unauthorized', component: UnauthorizedComponent },
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user