Connect: User Component reset to session is logged in.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@57069 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
3aaaf93625
commit
91d0246b62
|
@ -11,7 +11,6 @@ import {Session} from '../openaireLibrary/login/utils/helper.class';
|
||||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||||
import {SubscribeComponent} from '../utils/subscribe/subscribe.component';
|
import {SubscribeComponent} from '../utils/subscribe/subscribe.component';
|
||||||
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-user',
|
selector: 'openaire-user',
|
||||||
|
@ -54,17 +53,14 @@ export class OpenaireUserComponent {
|
||||||
public server: boolean = true;
|
public server: boolean = true;
|
||||||
loggedIn:boolean = false;
|
loggedIn:boolean = false;
|
||||||
constructor(private _subscribeService: SubscribeService,
|
constructor(private _subscribeService: SubscribeService,
|
||||||
private _emailService: EmailService, private route: ActivatedRoute,
|
private _emailService: EmailService, private route: ActivatedRoute){}
|
||||||
private userManagementService: UserManagementService){}
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
|
if( typeof document !== 'undefined') {
|
||||||
|
this.server = false;
|
||||||
|
this.loggedIn = Session.isLoggedIn();
|
||||||
|
}
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: any }) => {
|
.subscribe((data: { envSpecific: any }) => {
|
||||||
this.userManagementService.isLoggedIn(data.envSpecific.userInfoUrl).subscribe( isLoggedIn => {
|
|
||||||
if( typeof document !== 'undefined') {
|
|
||||||
this.server = false;
|
|
||||||
this.loggedIn = isLoggedIn;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.route.queryParams.subscribe(
|
this.route.queryParams.subscribe(
|
||||||
communityId => {
|
communityId => {
|
||||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||||
|
|
Loading…
Reference in New Issue