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:
@@ -38,13 +38,11 @@ export class AuthGuardEcm extends AuthGuardBase {
|
||||
super(authenticationService, router, appConfigService, dialog, storageService);
|
||||
}
|
||||
|
||||
checkLogin(_: ActivatedRouteSnapshot, redirectUrl: string): boolean {
|
||||
async checkLogin(_: ActivatedRouteSnapshot, redirectUrl: string): Promise<boolean> {
|
||||
if (this.authenticationService.isEcmLoggedIn() || this.withCredentials) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.redirectToUrl(redirectUrl);
|
||||
|
||||
return false;
|
||||
return this.redirectToUrl(redirectUrl);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user