web/flows: include user in access denied stage
closes #2039 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
90c31c2214
commit
4f800c4758
|
@ -31,10 +31,10 @@ import { EVENT_FLOW_ADVANCE, TITLE_DEFAULT } from "../constants";
|
||||||
import "../elements/LoadingOverlay";
|
import "../elements/LoadingOverlay";
|
||||||
import { first } from "../utils";
|
import { first } from "../utils";
|
||||||
import "./FlowInspector";
|
import "./FlowInspector";
|
||||||
import "./access_denied/FlowAccessDenied";
|
|
||||||
import "./sources/apple/AppleLoginInit";
|
import "./sources/apple/AppleLoginInit";
|
||||||
import "./sources/plex/PlexLoginInit";
|
import "./sources/plex/PlexLoginInit";
|
||||||
import "./stages/RedirectStage";
|
import "./stages/RedirectStage";
|
||||||
|
import "./stages/access_denied/AccessDeniedStage";
|
||||||
import "./stages/authenticator_duo/AuthenticatorDuoStage";
|
import "./stages/authenticator_duo/AuthenticatorDuoStage";
|
||||||
import "./stages/authenticator_sms/AuthenticatorSMSStage";
|
import "./stages/authenticator_sms/AuthenticatorSMSStage";
|
||||||
import "./stages/authenticator_static/AuthenticatorStaticStage";
|
import "./stages/authenticator_static/AuthenticatorStaticStage";
|
||||||
|
|
|
@ -2,8 +2,9 @@ import { t } from "@lingui/macro";
|
||||||
|
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
import { CSSResult, TemplateResult, html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import AKGlobal from "../../authentik.css";
|
import AKGlobal from "../../../authentik.css";
|
||||||
import PFForm from "@patternfly/patternfly/components/Form/form.css";
|
import PFForm from "@patternfly/patternfly/components/Form/form.css";
|
||||||
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
||||||
import PFList from "@patternfly/patternfly/components/List/list.css";
|
import PFList from "@patternfly/patternfly/components/List/list.css";
|
||||||
|
@ -13,11 +14,13 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { AccessDeniedChallenge, FlowChallengeResponseRequest } from "@goauthentik/api";
|
import { AccessDeniedChallenge, FlowChallengeResponseRequest } from "@goauthentik/api";
|
||||||
|
|
||||||
import "../../elements/EmptyState";
|
import "../../../elements/EmptyState";
|
||||||
import { BaseStage } from "../stages/base";
|
import { PFSize } from "../../../elements/Spinner";
|
||||||
|
import "../../FormStatic";
|
||||||
|
import { BaseStage } from "../base";
|
||||||
|
|
||||||
@customElement("ak-stage-access-denied")
|
@customElement("ak-stage-access-denied")
|
||||||
export class FlowAccessDenied extends BaseStage<
|
export class AccessDeniedStage extends BaseStage<
|
||||||
AccessDeniedChallenge,
|
AccessDeniedChallenge,
|
||||||
FlowChallengeResponseRequest
|
FlowChallengeResponseRequest
|
||||||
> {
|
> {
|
||||||
|
@ -33,7 +36,23 @@ export class FlowAccessDenied extends BaseStage<
|
||||||
<h1 class="pf-c-title pf-m-3xl">${this.challenge.flowInfo?.title}</h1>
|
<h1 class="pf-c-title pf-m-3xl">${this.challenge.flowInfo?.title}</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="pf-c-login__main-body">
|
<div class="pf-c-login__main-body">
|
||||||
<form method="POST" class="pf-c-form">
|
<form class="pf-c-form">
|
||||||
|
<ak-form-static
|
||||||
|
class="pf-c-form__group"
|
||||||
|
userAvatar="${this.challenge.pendingUserAvatar}"
|
||||||
|
user=${this.challenge.pendingUser}
|
||||||
|
>
|
||||||
|
<div slot="link">
|
||||||
|
<a href="${ifDefined(this.challenge.flowInfo?.cancelUrl)}"
|
||||||
|
>${t`Not you?`}</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</ak-form-static>
|
||||||
|
<div class="ak-loading">
|
||||||
|
<ak-spinner size=${PFSize.XLarge}></ak-spinner>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="pf-c-form">
|
||||||
<div class="pf-c-form__group">
|
<div class="pf-c-form__group">
|
||||||
<p>
|
<p>
|
||||||
<i class="pf-icon pf-icon-error-circle-o"></i>
|
<i class="pf-icon pf-icon-error-circle-o"></i>
|
||||||
|
@ -43,7 +62,7 @@ export class FlowAccessDenied extends BaseStage<
|
||||||
html`<hr />
|
html`<hr />
|
||||||
<p>${this.challenge.errorMessage}</p>`}
|
<p>${this.challenge.errorMessage}</p>`}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer class="pf-c-login__main-footer">
|
<footer class="pf-c-login__main-footer">
|
||||||
<ul class="pf-c-login__main-footer-links"></ul>
|
<ul class="pf-c-login__main-footer-links"></ul>
|
|
@ -2652,7 +2652,7 @@ msgstr "Load servers"
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowInspector.ts
|
#: src/flows/FlowInspector.ts
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
||||||
|
@ -3180,6 +3180,7 @@ msgstr "Not synced yet."
|
||||||
msgid "Not used by any other object."
|
msgid "Not used by any other object."
|
||||||
msgstr "Not used by any other object."
|
msgstr "Not used by any other object."
|
||||||
|
|
||||||
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
|
@ -3879,7 +3880,7 @@ msgstr "Reputation policy - Users"
|
||||||
msgid "Request"
|
msgid "Request"
|
||||||
msgstr "Request"
|
msgstr "Request"
|
||||||
|
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
msgid "Request has been denied."
|
msgid "Request has been denied."
|
||||||
msgstr "Request has been denied."
|
msgstr "Request has been denied."
|
||||||
|
|
||||||
|
|
|
@ -2632,7 +2632,7 @@ msgstr "Charger les serveurs"
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowInspector.ts
|
#: src/flows/FlowInspector.ts
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
||||||
|
@ -3159,6 +3159,7 @@ msgstr "Pas encore synchronisé."
|
||||||
msgid "Not used by any other object."
|
msgid "Not used by any other object."
|
||||||
msgstr "Pas utilisé par un autre objet."
|
msgstr "Pas utilisé par un autre objet."
|
||||||
|
|
||||||
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
|
@ -3851,7 +3852,7 @@ msgstr "Politique de réputation - Utilisateurs"
|
||||||
msgid "Request"
|
msgid "Request"
|
||||||
msgstr "Requête"
|
msgstr "Requête"
|
||||||
|
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
msgid "Request has been denied."
|
msgid "Request has been denied."
|
||||||
msgstr "La requête a été refusée."
|
msgstr "La requête a été refusée."
|
||||||
|
|
||||||
|
|
|
@ -2642,7 +2642,7 @@ msgstr ""
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowInspector.ts
|
#: src/flows/FlowInspector.ts
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
||||||
|
@ -3170,6 +3170,7 @@ msgstr ""
|
||||||
msgid "Not used by any other object."
|
msgid "Not used by any other object."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
|
@ -3869,7 +3870,7 @@ msgstr ""
|
||||||
msgid "Request"
|
msgid "Request"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
msgid "Request has been denied."
|
msgid "Request has been denied."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -2606,7 +2606,7 @@ msgstr "Sunucuları yükle"
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowExecutor.ts
|
#: src/flows/FlowExecutor.ts
|
||||||
#: src/flows/FlowInspector.ts
|
#: src/flows/FlowInspector.ts
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts
|
||||||
|
@ -3133,6 +3133,7 @@ msgstr "Henüz senkronize edilmedi."
|
||||||
msgid "Not used by any other object."
|
msgid "Not used by any other object."
|
||||||
msgstr "Başka bir nesne tarafından kullanılmaz."
|
msgstr "Başka bir nesne tarafından kullanılmaz."
|
||||||
|
|
||||||
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
#: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
#: src/flows/stages/authenticator_sms/AuthenticatorSMSStage.ts
|
||||||
|
@ -3816,7 +3817,7 @@ msgstr "İtibar ilkesi- Kullanıcılar"
|
||||||
msgid "Request"
|
msgid "Request"
|
||||||
msgstr "Talep"
|
msgstr "Talep"
|
||||||
|
|
||||||
#: src/flows/access_denied/FlowAccessDenied.ts
|
#: src/flows/stages/access_denied/AccessDeniedStage.ts
|
||||||
msgid "Request has been denied."
|
msgid "Request has been denied."
|
||||||
msgstr "İstek reddedildi."
|
msgstr "İstek reddedildi."
|
||||||
|
|
||||||
|
|
Reference in New Issue