From ce1a071d1651f6e78dd81666e3071be5e3482e4d Mon Sep 17 00:00:00 2001 From: Jens L Date: Mon, 25 Sep 2023 16:59:45 +0200 Subject: [PATCH] web/user: fix unenrollment flow not being shown (#6972) Signed-off-by: Jens Langhammer --- .../user-settings/details/UserSettingsFlowExecutor.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/src/user/user-settings/details/UserSettingsFlowExecutor.ts b/web/src/user/user-settings/details/UserSettingsFlowExecutor.ts index 2a369e1a6..e7aa36343 100644 --- a/web/src/user/user-settings/details/UserSettingsFlowExecutor.ts +++ b/web/src/user/user-settings/details/UserSettingsFlowExecutor.ts @@ -9,7 +9,7 @@ import "@goauthentik/user/user-settings/details/stages/prompt/PromptStage"; import { msg } from "@lit/localize"; import { CSSResult, TemplateResult, html } from "lit"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, state } from "lit/decorators.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; @@ -21,6 +21,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css"; import { ChallengeChoices, ChallengeTypes, + CurrentTenant, FlowChallengeResponseRequest, FlowErrorChallenge, FlowsApi, @@ -34,6 +35,9 @@ export class UserSettingsFlowExecutor extends AKElement implements StageHost { @property() flowSlug?: string; + @state() + tenant?: CurrentTenant; + private _challenge?: ChallengeTypes; @property({ attribute: false }) @@ -83,8 +87,8 @@ export class UserSettingsFlowExecutor extends AKElement implements StageHost { } firstUpdated(): void { - const tenant = rootInterface()?.tenant; - this.flowSlug = tenant?.flowUserSettings; + this.tenant = rootInterface()?.tenant; + this.flowSlug = this.tenant?.flowUserSettings; if (!this.flowSlug) { return; }