Add subscribe Guard in linking and direct linking
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51827 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
f452a63947
commit
f39f19a147
|
@ -5,12 +5,13 @@ import { OpenaireDirectLinkingComponent } from './directLinking.component';
|
|||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
|
||||
redirect: '/error'
|
||||
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard, ConnectSubscriberGuard], data: {
|
||||
redirect: '/error'
|
||||
}, canDeactivate: [PreviousRouteRecorder]},
|
||||
|
||||
])
|
||||
|
|
|
@ -7,12 +7,14 @@ import {DirectLinkingRoutingModule} from './directLinking-routing.module';
|
|||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
||||
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule, DirectLinkingModule, DirectLinkingRoutingModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled, ConnectSubscriberGuard, CommunityService],
|
||||
declarations: [
|
||||
OpenaireDirectLinkingComponent
|
||||
], exports:[OpenaireDirectLinkingComponent]
|
||||
|
|
|
@ -5,12 +5,13 @@ import { OpenaireLinkingComponent } from './linkingGeneric.component';
|
|||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
|
||||
redirect: '/error'
|
||||
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard, ConnectSubscriberGuard], data: {
|
||||
redirect: '/error'
|
||||
}, canDeactivate: [PreviousRouteRecorder]},
|
||||
|
||||
])
|
||||
|
|
|
@ -7,12 +7,14 @@ import{ LinkingGenericModule} from '../../openaireLibrary/claims/linking/linki
|
|||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
||||
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule, LinkingRoutingModule, LinkingGenericModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled, ConnectSubscriberGuard, CommunityService],
|
||||
declarations: [
|
||||
OpenaireLinkingComponent
|
||||
], exports:[
|
||||
|
|
Loading…
Reference in New Issue