mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Use hash strategy in demo shell as the other apps (#6402)
* hash startegy * use hash in e2e * trigger build * fix * fix * remove children router overwrite crazynes * Update login.module.ts * revert not needed changes * some fixes * fix * remove fdescribe * fix * fix * Update share-file.e2e.ts * Update lock-file.e2e.ts * Update share-file.e2e.ts * some fix * some other fixes * username as id * fix after rebase * username * fix usernamee * Fix the errorComponent * Attempt to fix unit test - to check * * Fixed circular dependency error while building adf-testing package * * Fixed failing UT * fix * use username * some fixes * some fix * fix Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com> Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local> Co-authored-by: sivakumar414ram <siva.kumar@muraai.com>
This commit is contained in:
@@ -65,10 +65,6 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild {
|
||||
if (this.authenticationService.isEcmLoggedIn() || this.withCredentials) {
|
||||
if (redirectFragment) {
|
||||
this.storageService.removeItem('loginFragment');
|
||||
const routeRedirectTo = route.routeConfig.children.filter( (routeTo) => routeTo.path === '' );
|
||||
if (routeRedirectTo?.length > 0) {
|
||||
routeRedirectTo[0].redirectTo = redirectFragment;
|
||||
}
|
||||
return this.router.createUrlTree([redirectFragment]);
|
||||
}
|
||||
return true;
|
||||
@@ -91,16 +87,18 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild {
|
||||
}
|
||||
|
||||
protected redirectToUrl(provider: string, url: string) {
|
||||
if (!this.isSilentLogin()) {
|
||||
const pathToLogin = `/${this.getLoginRoute()}`;
|
||||
let urlToRedirect;
|
||||
if (!this.authenticationService.isOauth()) {
|
||||
this.authenticationService.setRedirect({ provider, url });
|
||||
|
||||
const pathToLogin = this.getLoginRoute();
|
||||
const urlToRedirect = `/${pathToLogin}?redirectUrl=${url}`;
|
||||
|
||||
this.dialog.closeAll();
|
||||
|
||||
this.router.navigateByUrl(urlToRedirect);
|
||||
urlToRedirect = `${pathToLogin}?redirectUrl=${url}`;
|
||||
} else {
|
||||
urlToRedirect = pathToLogin;
|
||||
}
|
||||
|
||||
this.dialog.closeAll();
|
||||
this.router.navigateByUrl(urlToRedirect);
|
||||
}
|
||||
|
||||
protected getLoginRoute(): string {
|
||||
@@ -131,4 +129,5 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild {
|
||||
|
||||
return this.authenticationService.isOauth() && oauth && oauth.silentLogin;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user