Fixed 2FA form showing up even if user has not turned on the feature [#1442](https://github.com/getgrav/grav-plugin-admin/issues/1442)

This commit is contained in:
Matias Griese
2018-05-14 08:58:11 +03:00
parent cfb7e4c56f
commit fd2f58d20a
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
# v1.8.1
## mm/dd/2018
1. [](#bugfix)
* Fixed 2FA form showing up even if user has not turned on the feature [#1442](https://github.com/getgrav/grav-plugin-admin/issues/1442)
# v1.8.0
## 05/11/2018

View File

@@ -1,10 +1,10 @@
{% set user = grav.user %}
{% if user.username and user.authenticated %}
{% if user.authorized %}
{% include 'partials/login-logout.html.twig' %}
{% else %}
{% if not user.authorized and user.twofa_enabled %}
{% include 'partials/login-twofa.html.twig' %}
{% else %}
{% include 'partials/login-logout.html.twig' %}
{% endif %}
{% else %}
{% include 'partials/login-form.html.twig' %}