mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[MNT-21636] Refactor redirect URL (#6658)
* refactor redirect URL * fix unit test
This commit is contained in:
@@ -61,7 +61,7 @@ export class AuthGuard extends AuthGuardBase {
|
||||
|
||||
private ticketChangeRedirect(event: StorageEvent) {
|
||||
if (!event.newValue) {
|
||||
this.redirectToUrl(this.router.url);
|
||||
this.navigate(this.router.url);
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
@@ -69,9 +69,9 @@ export class AuthGuard extends AuthGuardBase {
|
||||
|
||||
async checkLogin(_: ActivatedRouteSnapshot, redirectUrl: string): Promise<boolean> {
|
||||
if (this.authenticationService.isLoggedIn() || this.withCredentials) {
|
||||
|
||||
return true;
|
||||
}
|
||||
this.redirectToUrl( redirectUrl);
|
||||
return false;
|
||||
return this.redirectToUrl( redirectUrl);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user