stages/*: fix warning for user settings API

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-18 01:09:34 +01:00
parent f1f706dd0d
commit 77a484e698
6 changed files with 4 additions and 86 deletions

View file

@ -1,27 +0,0 @@
{% extends 'login/base.html' %}
{% load static %}
{% load i18n %}
{% load authentik_utils %}
{% block card_title %}
{{ title }} <span>(403)</span>
{% endblock %}
{% block card %}
<form>
<h3>{{ main }}</h3>
{% if no_referer %}
<p>{{ no_referer1 }}</p>
<p>{{ no_referer2 }}</p>
<p>{{ no_referer3 }}</p>
{% endif %}
{% if no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% endif %}
{% if 'back' in request.GET %}
<a href="{% back %}" class="btn btn-primary btn-block btn-lg">{% trans 'Back' %}</a>
{% endif %}
</form>
{% endblock %}

View file

@ -1,55 +0,0 @@
{% load i18n %}
{% load authentik_user_settings %}
{% load authentik_utils %}
<div class="pf-c-page">
<main role="main" class="pf-c-page__main" tabindex="-1">
<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content">
<h1>
<i class="pf-icon pf-icon-user"></i>
{% trans 'User Settings' %}
</h1>
<p>{% trans "Configure settings relevant to your user profile." %}</p>
</div>
</section>
<ak-tabs vertical="true" style="height: 100%;">
<section slot="page-1" data-tab-title="{% trans 'User details' %}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-u-display-flex pf-u-justify-content-center">
<div class="pf-u-w-75">
<ak-site-shell url="{% url 'authentik_core:user-details' %}">
<div slot="body"></div>
</ak-site-shell>
</div>
</div>
</section>
<section slot="page-2" data-tab-title="{% trans 'Tokens' %}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<ak-token-user-list></ak-token-user-list>
</section>
{% user_stages as user_stages_loc %}
{% for stage, stage_link in user_stages_loc.items %}
<section slot="page-{{ stage.pk }}" data-tab-title="{{ stage|verbose_name }}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-u-display-flex pf-u-justify-content-center">
<div class="pf-u-w-75">
<ak-site-shell url="{{ stage_link }}">
<div slot="body"></div>
</ak-site-shell>
</div>
</div>
</section>
{% endfor %}
{% user_sources as user_sources_loc %}
{% for source, source_link in user_sources_loc.items %}
<section slot="page-{{ source.pk }}" data-tab-title="{{ source.name }}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-u-display-flex pf-u-justify-content-center">
<div class="pf-u-w-75">
<ak-site-shell url="{{ source_link }}">
<div slot="body"></div>
</ak-site-shell>
</div>
</div>
</section>
{% endfor %}
</ak-tabs>
</main>
</div>

View file

@ -46,7 +46,7 @@ class AuthenticatorStaticStage(ConfigurableStage, Stage):
return Challenge(
data={
"type": ChallengeTypes.shell.value,
"title": self._meta.verbose_name,
"title": str(self._meta.verbose_name),
"component": reverse(
"authentik_stages_authenticator_static:user-settings",
kwargs={"stage_uuid": self.stage_uuid},

View file

@ -49,7 +49,7 @@ class AuthenticatorTOTPStage(ConfigurableStage, Stage):
return Challenge(
data={
"type": ChallengeTypes.shell.value,
"title": self._meta.verbose_name,
"title": str(self._meta.verbose_name),
"component": reverse(
"authentik_stages_authenticator_totp:user-settings",
kwargs={"stage_uuid": self.stage_uuid},

View file

@ -47,7 +47,7 @@ class AuthenticateWebAuthnStage(ConfigurableStage, Stage):
return Challenge(
data={
"type": ChallengeTypes.shell.value,
"title": self._meta.verbose_name,
"title": str(self._meta.verbose_name),
"component": reverse(
"authentik_stages_authenticator_webauthn:user-settings",
kwargs={"stage_uuid": self.stage_uuid},

View file

@ -55,7 +55,7 @@ class PasswordStage(ConfigurableStage, Stage):
return Challenge(
data={
"type": ChallengeTypes.shell.value,
"title": self._meta.verbose_name,
"title": str(self._meta.verbose_name),
"component": reverse(
"authentik_stages_password:user-settings",
kwargs={"stage_uuid": self.pk},