From 8364098d10d893fa12497569b8d8d186117c5ee4 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 13 Jul 2020 22:56:30 +0000 Subject: [PATCH] [Trunk | Connect]: Remove IsRouteEnabled guard from landing and search pages (these pages should load even when not active - existing links from other pages). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@59100 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../dataProvider-routing.module.ts | 3 +-- .../dataProvider/libDataProvider.module.ts | 6 +---- .../dataset/dataset-routing.module.ts | 3 +-- .../landingPages/dataset/libDataset.module.ts | 3 +-- .../htmlProjectReport-routing.module.ts | 3 +-- .../libHtmlProjectReport.module.ts | 8 +----- .../organization/libOrganization.module.ts | 8 +----- .../organization-routing.module.ts | 3 +-- src/app/landingPages/orp/libOrp.module.ts | 3 +-- .../landingPages/orp/orp-routing.module.ts | 3 +-- .../landingPages/project/libProject.module.ts | 8 +----- .../project/project-routing.module.ts | 3 +-- .../publication/libPublication.module.ts | 3 +-- .../publication/publication-routing.module.ts | 3 +-- .../software/libSoftware.module.ts | 3 +-- .../software/software-routing.module.ts | 3 +-- .../advancedSearchDatasets-routing.module.ts | 5 +--- .../advanced/advancedSearchDatasets.module.ts | 3 +-- .../advancedSearchOrps-routing.module.ts | 4 +-- .../advanced/advancedSearchOrps.module.ts | 3 +-- ...vancedSearchPublications-routing.module.ts | 4 +-- .../advancedSearchPublications.module.ts | 3 +-- .../advancedSearchSoftware-routing.module.ts | 1 - .../advanced/advancedSearchSoftware.module.ts | 3 +-- .../searchResearchResults-routing.module.ts | 1 - .../advanced/searchResearchResults.module.ts | 3 +-- src/app/searchPages/find/libSearch.module.ts | 8 +----- .../find/mainSearch-routing.module.ts | 4 +-- .../searchDataProviders-routing.module.ts | 4 +-- .../simple/searchDataProviders.module.ts | 25 +++++++++---------- .../simple/searchDatasets-routing.module.ts | 3 +-- .../simple/searchDatasets.module.ts | 3 +-- .../searchOrganizations-routing.module.ts | 4 +-- .../simple/searchOrganizations.module.ts | 3 +-- .../simple/searchOrps-routing.module.ts | 4 +-- .../searchPages/simple/searchOrps.module.ts | 3 +-- .../simple/searchProjects-routing.module.ts | 4 +-- .../simple/searchProjects.module.ts | 3 +-- .../searchPublications-routing.module.ts | 4 +-- .../simple/searchPublications.module.ts | 3 +-- .../simple/searchResearchResults.module.ts | 3 +-- .../simple/searchSoftware-routing.module.ts | 4 +-- .../simple/searchSoftware.module.ts | 3 +-- 43 files changed, 52 insertions(+), 129 deletions(-) diff --git a/src/app/landingPages/dataProvider/dataProvider-routing.module.ts b/src/app/landingPages/dataProvider/dataProvider-routing.module.ts index 57fcd70..6379a65 100644 --- a/src/app/landingPages/dataProvider/dataProvider-routing.module.ts +++ b/src/app/landingPages/dataProvider/dataProvider-routing.module.ts @@ -4,12 +4,11 @@ import { RouterModule } from '@angular/router'; import { OpenaireDataProviderComponent } from './dataProvider.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireDataProviderComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireDataProviderComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/landingPages/dataProvider/libDataProvider.module.ts b/src/app/landingPages/dataProvider/libDataProvider.module.ts index e1b3819..d6f8f93 100644 --- a/src/app/landingPages/dataProvider/libDataProvider.module.ts +++ b/src/app/landingPages/dataProvider/libDataProvider.module.ts @@ -1,18 +1,14 @@ -//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; import { DataProviderModule } from '../../openaireLibrary/landingPages/dataProvider/dataProvider.module'; import { OpenaireDataProviderComponent } from './dataProvider.component'; import {DataProviderRoutingModule} from './dataProvider-routing.module'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' @NgModule({ imports: [DataProviderModule, DataProviderRoutingModule], declarations:[OpenaireDataProviderComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireDataProviderComponent] }) export class LibDataProviderModule { } diff --git a/src/app/landingPages/dataset/dataset-routing.module.ts b/src/app/landingPages/dataset/dataset-routing.module.ts index 2c942fa..4d69cc4 100644 --- a/src/app/landingPages/dataset/dataset-routing.module.ts +++ b/src/app/landingPages/dataset/dataset-routing.module.ts @@ -4,12 +4,11 @@ import { RouterModule } from '@angular/router'; import { OpenaireDatasetComponent } from './dataset.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireDatasetComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireDatasetComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/landingPages/dataset/libDataset.module.ts b/src/app/landingPages/dataset/libDataset.module.ts index 0bc8fb5..bca312d 100644 --- a/src/app/landingPages/dataset/libDataset.module.ts +++ b/src/app/landingPages/dataset/libDataset.module.ts @@ -2,13 +2,12 @@ import { NgModule} from '@angular/core'; import { OpenaireDatasetComponent } from './dataset.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import {DatasetRoutingModule} from './dataset-routing.module'; import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module"; @NgModule({ imports: [DatasetRoutingModule, ResultLandingModule], declarations:[OpenaireDatasetComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireDatasetComponent] }) export class LibDatasetModule { } diff --git a/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts b/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts index 448bc7d..f019aa0 100644 --- a/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts +++ b/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts @@ -4,13 +4,12 @@ import { RouterModule } from '@angular/router'; import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireHtmlProjectReportComponent , canActivate: [FreeGuard, IsRouteEnabled], + { path: '', component: OpenaireHtmlProjectReportComponent , canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder]} diff --git a/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts b/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts index 769370d..e5d2a1d 100644 --- a/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts +++ b/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts @@ -1,20 +1,14 @@ -//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { SharedModule } from '../../shared/shared.module'; -import { RouterModule } from '@angular/router'; import { HtmlProjectReportModule } from '../../openaireLibrary/landingPages/htmlProjectReport/htmlProjectReport.module'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component'; import {HtmlProjectReportRoutingModule} from './htmlProjectReport-routing.module'; @NgModule({ imports: [HtmlProjectReportModule, HtmlProjectReportRoutingModule], declarations:[OpenaireHtmlProjectReportComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireHtmlProjectReportComponent] }) export class LibHtmlProjectReportModule { } diff --git a/src/app/landingPages/organization/libOrganization.module.ts b/src/app/landingPages/organization/libOrganization.module.ts index 4fc9dfb..4111cc8 100644 --- a/src/app/landingPages/organization/libOrganization.module.ts +++ b/src/app/landingPages/organization/libOrganization.module.ts @@ -1,20 +1,14 @@ -//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { SharedModule } from '../../shared/shared.module'; -import { RouterModule } from '@angular/router'; import { OrganizationModule } from '../../openaireLibrary/landingPages/organization/organization.module'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import { OpenaireOrganizationComponent } from './organization.component'; import {OrganizationRoutingModule} from './organization-routing.module'; @NgModule({ imports: [OrganizationModule, OrganizationRoutingModule], declarations:[OpenaireOrganizationComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireOrganizationComponent] }) export class LibOrganizationModule { } diff --git a/src/app/landingPages/organization/organization-routing.module.ts b/src/app/landingPages/organization/organization-routing.module.ts index 747b51a..afc7bf7 100644 --- a/src/app/landingPages/organization/organization-routing.module.ts +++ b/src/app/landingPages/organization/organization-routing.module.ts @@ -4,13 +4,12 @@ import { RouterModule } from '@angular/router'; import { OpenaireOrganizationComponent } from './organization.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireOrganizationComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireOrganizationComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/landingPages/orp/libOrp.module.ts b/src/app/landingPages/orp/libOrp.module.ts index 80c0e00..5629ee8 100644 --- a/src/app/landingPages/orp/libOrp.module.ts +++ b/src/app/landingPages/orp/libOrp.module.ts @@ -1,7 +1,6 @@ import {NgModule} from '@angular/core'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import {OpenaireOrpComponent} from './orp.component'; import {OrpRoutingModule} from './orp-routing.module'; import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module"; @@ -14,7 +13,7 @@ import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/res OpenaireOrpComponent ], providers: [ - FreeGuard, PreviousRouteRecorder, IsRouteEnabled + FreeGuard, PreviousRouteRecorder ], exports: [ OpenaireOrpComponent diff --git a/src/app/landingPages/orp/orp-routing.module.ts b/src/app/landingPages/orp/orp-routing.module.ts index 1f6ffac..848ab00 100644 --- a/src/app/landingPages/orp/orp-routing.module.ts +++ b/src/app/landingPages/orp/orp-routing.module.ts @@ -4,12 +4,11 @@ import {RouterModule} from '@angular/router'; import {OpenaireOrpComponent } from './orp.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([{ - path: '', component: OpenaireOrpComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + path: '', component: OpenaireOrpComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] diff --git a/src/app/landingPages/project/libProject.module.ts b/src/app/landingPages/project/libProject.module.ts index 8e2dbd9..36d8447 100644 --- a/src/app/landingPages/project/libProject.module.ts +++ b/src/app/landingPages/project/libProject.module.ts @@ -1,20 +1,14 @@ -//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { SharedModule } from '../../shared/shared.module'; -import { RouterModule } from '@angular/router'; import { ProjectModule } from '../../openaireLibrary/landingPages/project/project.module'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import { OpenaireProjectComponent } from './project.component'; import {ProjectRoutingModule} from './project-routing.module'; @NgModule({ imports: [ProjectModule, ProjectRoutingModule], declarations:[OpenaireProjectComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireProjectComponent] }) export class LibProjectModule { } diff --git a/src/app/landingPages/project/project-routing.module.ts b/src/app/landingPages/project/project-routing.module.ts index 81521a6..dd498a3 100644 --- a/src/app/landingPages/project/project-routing.module.ts +++ b/src/app/landingPages/project/project-routing.module.ts @@ -4,12 +4,11 @@ import { RouterModule } from '@angular/router'; import { OpenaireProjectComponent } from './project.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireProjectComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireProjectComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/landingPages/publication/libPublication.module.ts b/src/app/landingPages/publication/libPublication.module.ts index 556f6b4..7a9b28a 100644 --- a/src/app/landingPages/publication/libPublication.module.ts +++ b/src/app/landingPages/publication/libPublication.module.ts @@ -1,7 +1,6 @@ import { NgModule} from '@angular/core'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import { OpenairePublicationComponent } from './publication.component'; import {PublicationRoutingModule} from './publication-routing.module'; import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module"; @@ -9,7 +8,7 @@ import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/res @NgModule({ imports: [PublicationRoutingModule, ResultLandingModule], declarations:[OpenairePublicationComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenairePublicationComponent] }) export class LibPublicationModule { } diff --git a/src/app/landingPages/publication/publication-routing.module.ts b/src/app/landingPages/publication/publication-routing.module.ts index 27b46b1..a022558 100644 --- a/src/app/landingPages/publication/publication-routing.module.ts +++ b/src/app/landingPages/publication/publication-routing.module.ts @@ -4,12 +4,11 @@ import { RouterModule } from '@angular/router'; import {OpenairePublicationComponent } from './publication.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenairePublicationComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenairePublicationComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/landingPages/software/libSoftware.module.ts b/src/app/landingPages/software/libSoftware.module.ts index d203c19..a14e789 100644 --- a/src/app/landingPages/software/libSoftware.module.ts +++ b/src/app/landingPages/software/libSoftware.module.ts @@ -1,14 +1,13 @@ import { NgModule} from '@angular/core'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; import { OpenaireSoftwareComponent } from './software.component'; import {SoftwareRoutingModule} from './software-routing.module'; import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module"; @NgModule({ imports: [SoftwareRoutingModule, ResultLandingModule], declarations:[OpenaireSoftwareComponent], - providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard, PreviousRouteRecorder], exports:[OpenaireSoftwareComponent] }) export class LibSoftwareModule { } diff --git a/src/app/landingPages/software/software-routing.module.ts b/src/app/landingPages/software/software-routing.module.ts index ba3864a..addd79e 100644 --- a/src/app/landingPages/software/software-routing.module.ts +++ b/src/app/landingPages/software/software-routing.module.ts @@ -4,13 +4,12 @@ import { RouterModule } from '@angular/router'; import {OpenaireSoftwareComponent } from './software.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSoftwareComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSoftwareComponent, canActivate: [FreeGuard], data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder] } ]) diff --git a/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts b/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts index cee1b2d..42c11ed 100644 --- a/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts @@ -2,9 +2,6 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; - -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @@ -12,7 +9,7 @@ import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousR @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireAdvancedSearchDatasetsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/advanced/advancedSearchDatasets.module.ts b/src/app/searchPages/advanced/advancedSearchDatasets.module.ts index dac684a..9d105b3 100644 --- a/src/app/searchPages/advanced/advancedSearchDatasets.module.ts +++ b/src/app/searchPages/advanced/advancedSearchDatasets.module.ts @@ -6,7 +6,6 @@ import { AdvancedSearchDatasetsRoutingModule} from './advancedSearchDatasets-rou import {OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; @NgModule({ @@ -18,7 +17,7 @@ import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchP declarations: [ OpenaireAdvancedSearchDatasetsComponent ], - providers:[FreeGuard, IsRouteEnabled], + providers:[FreeGuard], exports: [ OpenaireAdvancedSearchDatasetsComponent ] diff --git a/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts b/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts index 2485323..2f5d4d6 100644 --- a/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts @@ -4,13 +4,11 @@ import {RouterModule} from '@angular/router'; import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchOrpsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireAdvancedSearchOrpsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/advanced/advancedSearchOrps.module.ts b/src/app/searchPages/advanced/advancedSearchOrps.module.ts index 0208804..329b869 100644 --- a/src/app/searchPages/advanced/advancedSearchOrps.module.ts +++ b/src/app/searchPages/advanced/advancedSearchOrps.module.ts @@ -6,7 +6,6 @@ import {AdvancedSearchOrpsRoutingModule} from './advancedSearchOrps-routing. import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; @NgModule({ @@ -18,7 +17,7 @@ import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchP OpenaireAdvancedSearchOrpsComponent ], providers: [ - FreeGuard, IsRouteEnabled + FreeGuard ], exports: [ OpenaireAdvancedSearchOrpsComponent diff --git a/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts b/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts index 31e11a6..3847a22 100644 --- a/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireAdvancedSearchPublicationsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/advanced/advancedSearchPublications.module.ts b/src/app/searchPages/advanced/advancedSearchPublications.module.ts index 09ea81b..0d2f393 100644 --- a/src/app/searchPages/advanced/advancedSearchPublications.module.ts +++ b/src/app/searchPages/advanced/advancedSearchPublications.module.ts @@ -6,7 +6,6 @@ import {AdvancedSearchPublicationsRoutingModule} from './advancedSearchPublicati import {OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; @NgModule({ @@ -18,7 +17,7 @@ import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchP declarations: [ OpenaireAdvancedSearchPublicationsComponent ], - providers:[FreeGuard, IsRouteEnabled], + providers:[FreeGuard], exports: [ OpenaireAdvancedSearchPublicationsComponent ] diff --git a/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts b/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts index e352163..738fac8 100644 --- a/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts @@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router'; import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' @NgModule({ imports: [ diff --git a/src/app/searchPages/advanced/advancedSearchSoftware.module.ts b/src/app/searchPages/advanced/advancedSearchSoftware.module.ts index 086175a..59edd8a 100644 --- a/src/app/searchPages/advanced/advancedSearchSoftware.module.ts +++ b/src/app/searchPages/advanced/advancedSearchSoftware.module.ts @@ -6,7 +6,6 @@ import {AdvancedSearchSoftwareRoutingModule} from './advancedSearchSoftware-rout import {OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; @NgModule({ @@ -18,7 +17,7 @@ import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchP declarations: [ OpenaireAdvancedSearchSoftwareComponent ], - providers:[FreeGuard, IsRouteEnabled], + providers:[FreeGuard], exports: [ OpenaireAdvancedSearchSoftwareComponent ] diff --git a/src/app/searchPages/advanced/searchResearchResults-routing.module.ts b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts index 35745ad..9b2f9a4 100644 --- a/src/app/searchPages/advanced/searchResearchResults-routing.module.ts +++ b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts @@ -5,7 +5,6 @@ import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.com import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - @NgModule({ imports: [ RouterModule.forChild([ diff --git a/src/app/searchPages/advanced/searchResearchResults.module.ts b/src/app/searchPages/advanced/searchResearchResults.module.ts index f495397..795c61f 100644 --- a/src/app/searchPages/advanced/searchResearchResults.module.ts +++ b/src/app/searchPages/advanced/searchResearchResults.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.com import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; @NgModule({ @@ -19,7 +18,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sea declarations: [ OpenaireSearchResearchResultsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchResearchResultsComponent ] diff --git a/src/app/searchPages/find/libSearch.module.ts b/src/app/searchPages/find/libSearch.module.ts index c034338..a84bd4d 100644 --- a/src/app/searchPages/find/libSearch.module.ts +++ b/src/app/searchPages/find/libSearch.module.ts @@ -1,22 +1,16 @@ -//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { SharedModule } from '../../shared/shared.module'; -import { RouterModule } from '@angular/router'; import {MainSearchModule} from '../../openaireLibrary/searchPages/find/mainSearch.module'; import { OpenaireSearchComponent } from './search.component'; import { MainSearchRoutingModule } from './mainSearch-routing.module'; import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; -import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard"; import {SearchAllModule} from "../../openaireLibrary/searchPages/find/searchAll.module"; @NgModule({ imports: [MainSearchRoutingModule, MainSearchModule, SearchAllModule], declarations:[OpenaireSearchComponent], exports:[OpenaireSearchComponent], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], }) export class LibMainSearchModule { } diff --git a/src/app/searchPages/find/mainSearch-routing.module.ts b/src/app/searchPages/find/mainSearch-routing.module.ts index e7df40e..72382fe 100644 --- a/src/app/searchPages/find/mainSearch-routing.module.ts +++ b/src/app/searchPages/find/mainSearch-routing.module.ts @@ -4,14 +4,12 @@ import { RouterModule } from '@angular/router'; import{OpenaireSearchComponent} from './search.component'; import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; -import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard"; - @NgModule({ imports: [ RouterModule.forChild([ // { path: '', component: OpenaireSearchComponent } - { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] } + { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/app/searchPages/simple/searchDataProviders-routing.module.ts b/src/app/searchPages/simple/searchDataProviders-routing.module.ts index 75bf1dc..c84701b 100644 --- a/src/app/searchPages/simple/searchDataProviders-routing.module.ts +++ b/src/app/searchPages/simple/searchDataProviders-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import{OpenaireSearchDataprovidersComponent} from './searchDataproviders.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchDataprovidersComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchDataprovidersComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchDataProviders.module.ts b/src/app/searchPages/simple/searchDataProviders.module.ts index a9aff75..c758d2f 100644 --- a/src/app/searchPages/simple/searchDataProviders.module.ts +++ b/src/app/searchPages/simple/searchDataProviders.module.ts @@ -1,30 +1,29 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component'; -import{ SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module'; +import {SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchDataProvidersModule} from '../../openaireLibrary/searchPages/simple/searchDataProviders.module'; import {SearchPageTableViewModule} from '../../openaireLibrary/searchPages/searchUtils/searchPageTableView.module'; -//import {DataProvidersServiceModule} from '../../openaireLibrary/services/dataProvidersService.module'; -import {SearchFormModule} from '../../openaireLibrary/searchPages/searchUtils/searchForm.module'; +import {SearchFormModule} from '../../openaireLibrary/searchPages/searchUtils/searchForm.module'; import {SearchDataprovidersServiceModule} from '../../openaireLibrary/connect/contentProviders/searchDataprovidersService.module'; + @NgModule({ imports: [ CommonModule, FormsModule, -SearchDataProvidersModule, SearchDataProvidersRoutingModule, -SearchPageTableViewModule, /*DataProvidersServiceModule,*/ SearchFormModule, SearchDataprovidersServiceModule + SearchDataProvidersModule, SearchDataProvidersRoutingModule, + SearchPageTableViewModule, SearchFormModule, SearchDataprovidersServiceModule ], declarations: [ OpenaireSearchDataprovidersComponent - ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + ], + providers: [FreeGuard, PreviousRouteRecorder], exports: [ OpenaireSearchDataprovidersComponent - ] + ] }) -export class LibSearchDataProvidersModule { } +export class LibSearchDataProvidersModule {} diff --git a/src/app/searchPages/simple/searchDatasets-routing.module.ts b/src/app/searchPages/simple/searchDatasets-routing.module.ts index fd5fae3..d39cbe6 100644 --- a/src/app/searchPages/simple/searchDatasets-routing.module.ts +++ b/src/app/searchPages/simple/searchDatasets-routing.module.ts @@ -6,13 +6,12 @@ import { EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properti import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchDatasetsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] , resolve: { envSpecific: EnvironmentSpecificResolver }}, diff --git a/src/app/searchPages/simple/searchDatasets.module.ts b/src/app/searchPages/simple/searchDatasets.module.ts index 4686c0e..adca757 100644 --- a/src/app/searchPages/simple/searchDatasets.module.ts +++ b/src/app/searchPages/simple/searchDatasets.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchDatasetsComponent} from './searchDatasets.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; @@ -20,7 +19,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sim declarations: [ OpenaireSearchDatasetsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchDatasetsComponent ] diff --git a/src/app/searchPages/simple/searchOrganizations-routing.module.ts b/src/app/searchPages/simple/searchOrganizations-routing.module.ts index 1fff105..2f2d6e3 100644 --- a/src/app/searchPages/simple/searchOrganizations-routing.module.ts +++ b/src/app/searchPages/simple/searchOrganizations-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchOrganizationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchOrganizationsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchOrganizations.module.ts b/src/app/searchPages/simple/searchOrganizations.module.ts index f56c7c4..00fbc2c 100644 --- a/src/app/searchPages/simple/searchOrganizations.module.ts +++ b/src/app/searchPages/simple/searchOrganizations.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.compone import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import { SearchOrganizationsModule} from '../../openaireLibrary/searchPages/simple/searchOrganizations.module'; @@ -20,7 +19,7 @@ import { SearchOrganizationsModule} from '../../openaireLibrary/searchPages/simp declarations: [ OpenaireSearchOrganizationsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchOrganizationsComponent ] diff --git a/src/app/searchPages/simple/searchOrps-routing.module.ts b/src/app/searchPages/simple/searchOrps-routing.module.ts index 49bbd69..6468ae0 100644 --- a/src/app/searchPages/simple/searchOrps-routing.module.ts +++ b/src/app/searchPages/simple/searchOrps-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import {OpenaireSearchOrpsComponent} from './searchOrps.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchOrpsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchOrpsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchOrps.module.ts b/src/app/searchPages/simple/searchOrps.module.ts index 053c479..aa6ab95 100644 --- a/src/app/searchPages/simple/searchOrps.module.ts +++ b/src/app/searchPages/simple/searchOrps.module.ts @@ -7,7 +7,6 @@ import {OpenaireSearchOrpsComponent} from './searchOrps.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; @NgModule({ @@ -19,7 +18,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sim OpenaireSearchOrpsComponent ], providers: [ - FreeGuard, PreviousRouteRecorder, IsRouteEnabled + FreeGuard, PreviousRouteRecorder ], exports: [ OpenaireSearchOrpsComponent diff --git a/src/app/searchPages/simple/searchProjects-routing.module.ts b/src/app/searchPages/simple/searchProjects-routing.module.ts index 0d41296..a21ad21 100644 --- a/src/app/searchPages/simple/searchProjects-routing.module.ts +++ b/src/app/searchPages/simple/searchProjects-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import{OpenaireSearchProjectsComponent} from './searchProjects.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchProjectsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchProjectsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchProjects.module.ts b/src/app/searchPages/simple/searchProjects.module.ts index e069cee..6877103 100644 --- a/src/app/searchPages/simple/searchProjects.module.ts +++ b/src/app/searchPages/simple/searchProjects.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchProjectsComponent} from './searchProjects.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import { SearchProjectsModule} from '../../openaireLibrary/searchPages/simple/searchProjects.module'; import { SearchPageTableViewModule} from '../../openaireLibrary/searchPages/searchUtils/searchPageTableView.module'; @@ -24,7 +23,7 @@ import {SearchProjectsServiceModule} from '../../openaireLibrary/connect/project declarations: [ OpenaireSearchProjectsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchProjectsComponent ] diff --git a/src/app/searchPages/simple/searchPublications-routing.module.ts b/src/app/searchPages/simple/searchPublications-routing.module.ts index 58ba0db..0446756 100644 --- a/src/app/searchPages/simple/searchPublications-routing.module.ts +++ b/src/app/searchPages/simple/searchPublications-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import{OpenaireSearchPublicationsComponent} from './searchPublications.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { + { path: '', component: OpenaireSearchPublicationsComponent, canActivate: [FreeGuard], data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchPublications.module.ts b/src/app/searchPages/simple/searchPublications.module.ts index d34ee6e..941d632 100644 --- a/src/app/searchPages/simple/searchPublications.module.ts +++ b/src/app/searchPages/simple/searchPublications.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchPublicationsComponent} from './searchPublications.component import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; @NgModule({ @@ -20,7 +19,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sim declarations: [ OpenaireSearchPublicationsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchPublicationsComponent ] diff --git a/src/app/searchPages/simple/searchResearchResults.module.ts b/src/app/searchPages/simple/searchResearchResults.module.ts index 41765a5..e50f83a 100644 --- a/src/app/searchPages/simple/searchResearchResults.module.ts +++ b/src/app/searchPages/simple/searchResearchResults.module.ts @@ -7,7 +7,6 @@ import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.com import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; @NgModule({ @@ -19,7 +18,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sea declarations: [ OpenaireSearchResearchResultsComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + providers:[FreeGuard,PreviousRouteRecorder], exports: [ OpenaireSearchResearchResultsComponent ] diff --git a/src/app/searchPages/simple/searchSoftware-routing.module.ts b/src/app/searchPages/simple/searchSoftware-routing.module.ts index c6dd2f9..5c5acf6 100644 --- a/src/app/searchPages/simple/searchSoftware-routing.module.ts +++ b/src/app/searchPages/simple/searchSoftware-routing.module.ts @@ -4,13 +4,11 @@ import { RouterModule } from '@angular/router'; import {OpenaireSearchSoftwareComponent} from './searchSoftware.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' - @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchSoftwareComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder], data: { + { path: '', component: OpenaireSearchSoftwareComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder], data: { redirect: '/error' } } diff --git a/src/app/searchPages/simple/searchSoftware.module.ts b/src/app/searchPages/simple/searchSoftware.module.ts index 629e811..820e972 100644 --- a/src/app/searchPages/simple/searchSoftware.module.ts +++ b/src/app/searchPages/simple/searchSoftware.module.ts @@ -6,7 +6,6 @@ import{ SearchSoftwareRoutingModule} from './searchSoftware-routing.module'; import{OpenaireSearchSoftwareComponent} from './searchSoftware.component'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; @@ -17,7 +16,7 @@ import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/sim declarations: [ OpenaireSearchSoftwareComponent ], - providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled + providers:[FreeGuard,PreviousRouteRecorder ], exports: [ OpenaireSearchSoftwareComponent