mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
Override the redirectTo with the loginFragment (#6239)
* Override the redirectTo with the loginFragment * Add check
This commit is contained in:
parent
f852811920
commit
01fb4fa2b6
@ -65,7 +65,10 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild {
|
||||
if (this.authenticationService.isEcmLoggedIn() || this.withCredentials) {
|
||||
if (redirectFragment) {
|
||||
this.storageService.removeItem('loginFragment');
|
||||
return this.router.createUrlTree([redirectFragment]);
|
||||
const routeRedirectTo = route.routeConfig.children.filter( (routeTo) => routeTo.path === '' );
|
||||
if (routeRedirectTo?.length > 0) {
|
||||
routeRedirectTo[0].redirectTo = redirectFragment;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user