mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-2195] fix redirect on login after page reload (#997)
This commit is contained in:
parent
52bb48c825
commit
4fde215fad
@ -81,8 +81,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
if (error.status === 401) {
|
if (error.status === 401) {
|
||||||
if (!this.authenticationService.isLoggedIn()) {
|
if (!this.authenticationService.isLoggedIn()) {
|
||||||
this.store.dispatch(new CloseModalDialogsAction());
|
this.store.dispatch(new CloseModalDialogsAction());
|
||||||
|
|
||||||
|
let redirectUrl = this.route.snapshot.queryParams['redirectUrl'];
|
||||||
|
if (!redirectUrl) {
|
||||||
|
redirectUrl = this.router.url;
|
||||||
|
}
|
||||||
|
|
||||||
this.router.navigate(['/login'], {
|
this.router.navigate(['/login'], {
|
||||||
queryParams: { returnUrl: 'personal-files' }
|
queryParams: { redirectUrl: redirectUrl }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user