Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web/user: fix unenrollment flow not being shown #6972

Merged
merged 1 commit into from Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions web/src/user/user-settings/details/UserSettingsFlowExecutor.ts
Expand Up @@ -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";
Expand All @@ -21,6 +21,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
import {
ChallengeChoices,
ChallengeTypes,
CurrentTenant,
FlowChallengeResponseRequest,
FlowErrorChallenge,
FlowsApi,
Expand All @@ -34,6 +35,9 @@ export class UserSettingsFlowExecutor extends AKElement implements StageHost {
@property()
flowSlug?: string;

@state()
tenant?: CurrentTenant;

private _challenge?: ChallengeTypes;

@property({ attribute: false })
Expand Down Expand Up @@ -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;
}
Expand Down