mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed exception when accessing user admin pagee
This commit is contained in:
parent
34573bb5e6
commit
e83f14f1ee
1 changed files with 3 additions and 3 deletions
|
@ -54,8 +54,8 @@
|
|||
{% endif %}
|
||||
</p>
|
||||
<p><b>{% trans %}user.edit.tfa.u2f_keys_count{% endtrans %}:</b>
|
||||
{% if entity.u2FAuthEnabled %}
|
||||
{{ entity.u2FKeys | length }}
|
||||
{% if entity.webAuthnAuthenticatorEnabled %}
|
||||
{{ (entity.webauthnKeys | length) + (entity.legacyU2FKeys | length) }}
|
||||
{% else %}
|
||||
{% trans %}user.edit.tfa.disabled{% endtrans %}
|
||||
{% endif %}
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
{% set tfa_disable_disabled = not is_granted('set_password', entity) %}
|
||||
{# Disable button when he has no 2FA activated #}
|
||||
{% if not entity.u2FAuthEnabled and not entity.googleAuthenticatorEnabled and entity.backupCodes is empty %}
|
||||
{% if not entity.webAuthnAuthenticatorEnabled and not entity.googleAuthenticatorEnabled and entity.backupCodes is empty %}
|
||||
{% set tfa_disable_disabled = true %}
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue