From 85a1688dc0840f1f713f546b1a86c21e63833522 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Tue, 22 Sep 2020 08:35:52 +0000 Subject: [PATCH] [Library|Trunk] Display claims: avoid loop when user is logged in but the service returns 403 (e.g different AAI instance) git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59444 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../displayClaims/displayClaims.component.html | 2 +- .../displayClaims/displayClaims.component.ts | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 91431b8c..eb1e8434 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -142,7 +142,7 @@ An Error occured.
- You are not allowed to access this page. + You are not authorized to view the results.
User session is not valid. Please login again. diff --git a/claims/claim-utils/displayClaims/displayClaims.component.ts b/claims/claim-utils/displayClaims/displayClaims.component.ts index bb085ad4..65ae41bb 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -262,12 +262,15 @@ export class DisplayClaimsComponent { if (error.code && error.code == 403) { this.showErrorMessage = false; this.showForbiddenMessage = true; - this._router.navigate(['/user-info'], { - queryParams: { - "errorCode": LoginErrorCodes.NOT_VALID, - "redirectUrl": this._router.url - } - }); + if(!Session.isLoggedIn()) { + + this._router.navigate(['/user-info'], { + queryParams: { + "errorCode": LoginErrorCodes.NOT_VALID, + "redirectUrl": this._router.url + } + }); + } } } catch (e) {