diff --git a/authentik/core/templates/login/base_full.html b/authentik/core/templates/login/base_full.html index eee976eec..4e7b729c3 100644 --- a/authentik/core/templates/login/base_full.html +++ b/authentik/core/templates/login/base_full.html @@ -12,6 +12,25 @@ .pf-c-background-image::before { --ak-flow-background: url("/static/dist/assets/images/flow_background.jpg"); } +/* Form with user */ +.form-control-static { + margin-top: var(--pf-global--spacer--sm); + display: flex; + align-items: center; + justify-content: space-between; +} +.form-control-static .avatar { + display: flex; + align-items: center; +} +.form-control-static img { + margin-right: var(--pf-global--spacer--xs); +} +.form-control-static a { + padding-top: var(--pf-global--spacer--xs); + padding-bottom: var(--pf-global--spacer--xs); + line-height: var(--pf-global--spacer--xl); +} {% endblock %} @@ -59,13 +78,11 @@ {{ link.name }} {% endfor %} - {% if tenant.branding_title != "authentik" %}
  • {% trans 'Powered by authentik' %}
  • - {% endif %} diff --git a/authentik/policies/denied.py b/authentik/policies/denied.py index b65688727..946f56d47 100644 --- a/authentik/policies/denied.py +++ b/authentik/policies/denied.py @@ -3,6 +3,7 @@ from typing import Any, Optional from django.http.request import HttpRequest from django.template.response import TemplateResponse +from django.urls import reverse from django.utils.translation import gettext as _ from authentik.core.models import USER_ATTRIBUTE_DEBUG @@ -37,4 +38,5 @@ class AccessDeniedResponse(TemplateResponse): self._request ).get(USER_ATTRIBUTE_DEBUG, False): context["policy_result"] = self.policy_result + context["cancel"] = reverse("authentik_flows:cancel") return context diff --git a/authentik/policies/templates/policies/denied.html b/authentik/policies/templates/policies/denied.html index 3c26e4f03..05b43e4f9 100644 --- a/authentik/policies/templates/policies/denied.html +++ b/authentik/policies/templates/policies/denied.html @@ -12,8 +12,21 @@ {% endblock %} {% block card %} -
    + {% csrf_token %} + {% if user.is_authenticated %} +
    +
    +
    + {% trans + {{ user.username }} +
    +
    + {% trans "Not you?" %} +
    +
    +
    + {% endif %}

    diff --git a/web/src/authentik.css b/web/src/authentik.css index 7d0c7cae1..2e9d7ffc2 100644 --- a/web/src/authentik.css +++ b/web/src/authentik.css @@ -37,6 +37,7 @@ html > form > input { .pf-c-login__main { display: block; position: relative; + width: 100%; } .ak-login-container { height: calc(100vh - var(--pf-global--spacer--lg) - var(--pf-global--spacer--lg)); diff --git a/web/src/flows/FlowExecutor.ts b/web/src/flows/FlowExecutor.ts index 9d6c7078a..e5739b93b 100644 --- a/web/src/flows/FlowExecutor.ts +++ b/web/src/flows/FlowExecutor.ts @@ -113,9 +113,6 @@ export class FlowExecutor extends LitElement implements StageHost { .pf-c-drawer__content { background-color: transparent; } - .pf-c-login__main { - width: 100%; - } `); }