From edbd5a8fa3468c15a0c2f7ffbaed3cd118ae73ca Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 17 Mar 2021 09:58:12 +0000 Subject: [PATCH] [Library | Trunk]: Add fixRedirectUrl on service git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60654 d315682c-612b-4755-9ff5-7f18f6832af3 --- login/userMini.component.ts | 1 - services/user-management.service.ts | 7 ++++++- sharedComponents/navigationBar.component.html | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/login/userMini.component.ts b/login/userMini.component.ts index 9ece0ec8..07fe16ff 100644 --- a/login/userMini.component.ts +++ b/login/userMini.component.ts @@ -173,7 +173,6 @@ export class UserMiniComponent implements OnInit, OnChanges { @Input() logInUrl; @Input() logOutUrl; @Input() cookieDomain; - @Input() fixRedirectUrl: string; @Input() dark: boolean = false; subscriptions = []; diff --git a/services/user-management.service.ts b/services/user-management.service.ts index 4a867a71..16360a13 100644 --- a/services/user-management.service.ts +++ b/services/user-management.service.ts @@ -14,6 +14,7 @@ import {StringUtils} from "../utils/string-utils.class"; export class UserManagementService{ private getUserInfoSubject: BehaviorSubject = new BehaviorSubject(null); + public fixRedirectURL: string = null; private readonly promise: Promise; sub; routeSub; @@ -138,7 +139,11 @@ export class UserManagementService{ } public login() { - this.setRedirectUrl(); + if(this.fixRedirectURL) { + this.setRedirectUrl(this.fixRedirectURL); + } else { + this.setRedirectUrl(); + } window.location.href = properties.loginUrl; } diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index 6a6cb90f..7b3f5bde 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -109,7 +109,6 @@ @@ -242,7 +241,6 @@