[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
This commit is contained in:
argiro.kokogiannaki 2020-09-22 08:35:52 +00:00
parent ca54df782c
commit 85a1688dc0
2 changed files with 10 additions and 7 deletions

View File

@ -142,7 +142,7 @@
An Error occured.
</div>
<div *ngIf="showForbiddenMessage " class="uk-alert uk-alert-danger ">
You are not allowed to access this page.
You are not authorized to view the results.
</div>
<div *ngIf="userValidMessage.length > 0 " class="uk-alert uk-alert-danger ">
User session is not valid. Please login again.

View File

@ -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) {