mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1589] fix auth redirects when ticket expires (#529)
This commit is contained in:
@@ -68,6 +68,7 @@ export class AppComponent implements OnInit {
|
|||||||
this.alfrescoApiService.getInstance().on('error', error => {
|
this.alfrescoApiService.getInstance().on('error', error => {
|
||||||
if (error.status === 401) {
|
if (error.status === 401) {
|
||||||
if (!this.authenticationService.isLoggedIn()) {
|
if (!this.authenticationService.isLoggedIn()) {
|
||||||
|
this.authenticationService.setRedirect({ provider: 'ECM', url: this.router.url });
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -117,8 +117,10 @@ export class PreviewComponent extends PageComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.router.navigate([this.previewLocation, id]);
|
this.router.navigate([this.previewLocation, id]);
|
||||||
} catch {
|
} catch (err) {
|
||||||
this.router.navigate([this.previewLocation, id]);
|
if (!err || err.status !== 401) {
|
||||||
|
this.router.navigate([this.previewLocation, id]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user