Merge branch 'keycloak'

This commit is contained in:
Jan Böhmer 2023-03-04 17:15:50 +01:00
commit 6230ad971b
45 changed files with 1291 additions and 39 deletions

View file

@ -33,6 +33,10 @@
</div>
<div class="tab-pane" id="password">
<div class="offset-3 mb-3 col-9">
<span class="badge badge-warning bg-warning"><i class="fa-solid fa-house-user"></i> {% trans %}user.saml_user{% endtrans %}</span>
</div>
{{ form_row(form.new_password) }}
{{ form_row(form.need_pw_change) }}
{{ form_row(form.disabled) }}

View file

@ -27,6 +27,15 @@
<input type="hidden" name="_target_path" value="{{ app.request.query.get('_target_path') }}" />
{% if saml_enabled %}
<div class="col-md-9 offset-md-3 col-lg-10 offset-lg-2">
<a class="btn btn-secondary" href="{{ path('saml_login') }}"><i class="fa-solid fa-house-user"></i> {% trans %}login.sso_saml_login{% endtrans %}</a>
<p class="text-muted">{% trans %}login.local_login_hint{% endtrans %}</p>
</div>
{% endif %}
<div class="form-group row">
<label class="col-form-label col-md-3 col-lg-2">{% trans %}login.username.label{% endtrans %}</label>
<div class="col-md-9 col-lg-10">

View file

@ -151,7 +151,9 @@
<p><b>{% trans %}tfa_u2f.no_keys_registered{% endtrans %}</b></p>
{% endif %}
<a href="{{ path('webauthn_register') }}" class="btn btn-success"><i class="fas fa-plus-square fa-fw"></i> {% trans %}tfa_u2f.add_new_key{% endtrans %}</a>
{% if not user.samlUser %}
<a href="{{ path('webauthn_register') }}" class="btn btn-success" ><i class="fas fa-plus-square fa-fw"></i> {% trans %}tfa_u2f.add_new_key{% endtrans %}</a>
{% endif %}
</div>
<div class="tab-pane fade" id="tfa-trustedDevices" role="tabpanel" aria-labelledby="trustedDevices-tab-tab">
@ -163,7 +165,7 @@
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('devices_reset' ~ user.id) }}">
<button class="btn btn-danger" type="submit">{% trans %}tfa_trustedDevices.invalidate.btn{% endtrans %}</button>
<button class="btn btn-danger" type="submit" {% if user.samlUser %}disabled{% endif %}>{% trans %}tfa_trustedDevices.invalidate.btn{% endtrans %}</button>
</form>
</div>

View file

@ -52,9 +52,16 @@
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}group.label{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">{{ user.group.fullPath }}</p>
<p class="form-control-plaintext">{{ user.group.fullPath ?? '' }}</p>
</div>
</div>
{% if user.samlUser %}
<div class="form-group row">
<div class="col-md-8 offset-md-4">
<span class="badge badge-primary bg-primary"><i class="fa-solid fa-house-user"></i> {% trans %}user.saml_user{% endtrans %}</span>
</div>
</div>
{% endif %}
</div>
</div>
</div>
@ -74,9 +81,9 @@
{% endif %}
<div class="mt-2">
{% if datatable is defined and datatable is not null %}
{% import "components/history_log_macros.html.twig" as log %}
{{ log.element_history_component(datatable) }}
{% endif %}
{% if datatable is defined and datatable is not null %}
{% import "components/history_log_macros.html.twig" as log %}
{{ log.element_history_component(datatable) }}
{% endif %}
</div>
{% endblock %}

View file

@ -52,6 +52,15 @@
{% block content %}
{{ parent() }}
{% if user.samlUser %}
<div class="alert alert-warning mt-3" role="alert">
<h4 class="alert-heading">{% trans %}user.saml_user{% endtrans %}</h4>
<p>
{% trans %}user.saml_user.pw_change_hint{% endtrans %}
</p>
</div>
{% endif %}
{% include "users/_2fa_settings.html.twig" %}
<div class="card mt-4">