Do not use current_user to check if authenticated, go through the LoginManager class

This commit is contained in:
Gregoo 2025-01-18 21:03:16 +01:00
parent 6b62a1f89b
commit d4bce7491a

View File

@ -38,7 +38,7 @@
{% endfor %}
</ul>
{% if g.login.is_enabled() %}
{% if current_user.is_authenticated %}
{% if g.login.is_authenticated() %}
<a href="{{ url_for('admin.admin', open_logout=true) }}" class="badge text-bg-success text-decoration-none">Authenticated</a>
{% else %}
<a href="{{ url_for('login.login', next=request.path) }}" class="badge text-bg-secondary text-decoration-none">Read-only</a>