mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
Merge remote-tracking branch 'remotes/origin/master' into shibboleth
# Conflicts: # resources/i18n/de.json5 # resources/i18n/en.json5 # src/app/shared/shared.module.ts
This commit is contained in:
@@ -373,8 +373,7 @@ export class AuthService {
|
||||
if (isNotEmpty(redirectUrl)) {
|
||||
this.clearRedirectUrl();
|
||||
this.router.onSameUrlNavigation = 'reload';
|
||||
const url = decodeURIComponent(redirectUrl);
|
||||
this.navigateToRedirectUrl(url);
|
||||
this.navigateToRedirectUrl(redirectUrl);
|
||||
} else {
|
||||
// If redirectUrl is empty use history.
|
||||
this.routeService.getHistory().pipe(
|
||||
@@ -395,16 +394,17 @@ export class AuthService {
|
||||
|
||||
}
|
||||
|
||||
protected navigateToRedirectUrl(url: string) {
|
||||
protected navigateToRedirectUrl(redirectUrl: string) {
|
||||
const url = decodeURIComponent(redirectUrl);
|
||||
// in case the user navigates directly to /login (via bookmark, etc), or the route history is not found.
|
||||
if (isEmpty(url) || url.startsWith(LOGIN_ROUTE)) {
|
||||
this.router.navigate(['/']);
|
||||
this.router.navigateByUrl('/');
|
||||
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
||||
// this._window.nativeWindow.location.href = '/';
|
||||
} else {
|
||||
/* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */
|
||||
// this._window.nativeWindow.location.href = url;
|
||||
this.router.navigate([url]);
|
||||
this.router.navigateByUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user