From 9347a196c04f076d0a9eab734382301615f8b23c Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Tue, 26 Jul 2022 06:41:49 +0200 Subject: [PATCH] fix(console): statehandler (#4042) Co-authored-by: Livio Spring --- console/src/app/app.module.ts | 6 ++++++ .../services/statehandler/statehandler-processor.service.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/console/src/app/app.module.ts b/console/src/app/app.module.ts index 622abcf60f..ce5e780988 100644 --- a/console/src/app/app.module.ts +++ b/console/src/app/app.module.ts @@ -15,6 +15,9 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { AuthConfig, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc'; import { QuicklinkModule } from 'ngx-quicklink'; import { from, Observable } from 'rxjs'; +import { AuthGuard } from 'src/app/guards/auth.guard'; +import { RoleGuard } from 'src/app/guards/role.guard'; +import { UserGuard } from 'src/app/guards/user.guard'; import { InfoOverlayModule } from 'src/app/modules/info-overlay/info-overlay.module'; import { AssetService } from 'src/app/services/asset.service'; @@ -120,6 +123,9 @@ const authConfig: AuthConfig = { ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }), ], providers: [ + AuthGuard, + RoleGuard, + UserGuard, ThemeService, { provide: APP_INITIALIZER, diff --git a/console/src/app/services/statehandler/statehandler-processor.service.ts b/console/src/app/services/statehandler/statehandler-processor.service.ts index 2adad0e3af..89da854cf4 100644 --- a/console/src/app/services/statehandler/statehandler-processor.service.ts +++ b/console/src/app/services/statehandler/statehandler-processor.service.ts @@ -13,7 +13,7 @@ export class StatehandlerProcessorServiceImpl implements StatehandlerProcessorSe constructor(private location: Location, private router: Router) {} public createState(url: string): string { - const externalUrl = this.location.prepareExternalUrl(url); + const externalUrl = url; const urlId = uuidv4(); sessionStorage.setItem(urlId, externalUrl); return urlId;