fix: Only try to access trust level when authenticated
This commit is contained in:
@@ -92,17 +92,19 @@
|
|||||||
{% translate 'Tierheime in der Nähe' %}
|
{% translate 'Tierheime in der Nähe' %}
|
||||||
</a>
|
</a>
|
||||||
<br/>
|
<br/>
|
||||||
{% trust_level "MODERATOR" as coordinator_trust_level %}
|
{% if request.user.is_authenticated %}
|
||||||
{% if request.user.trust_level >= coordinator_trust_level %}
|
{% trust_level "MODERATOR" as coordinator_trust_level %}
|
||||||
<a class="nav-link " href="{% url "modtools" %}">
|
{% if request.user.trust_level >= coordinator_trust_level %}
|
||||||
{% translate 'Moderationstools' %}
|
<a class="nav-link " href="{% url "modtools" %}">
|
||||||
</a>
|
{% translate 'Moderationstools' %}
|
||||||
{% endif %}
|
</a>
|
||||||
<br/>
|
{% endif %}
|
||||||
{% if request.user.is_superuser %}
|
<br/>
|
||||||
<a class="nav-link " href="{% url "admin:index" %}">
|
{% if request.user.is_superuser %}
|
||||||
<i class="fa-solid fa-screwdriver-wrench fa-fw"></i>{% translate 'Admin-Bereich' %}
|
<a class="nav-link " href="{% url "admin:index" %}">
|
||||||
</a>
|
<i class="fa-solid fa-screwdriver-wrench fa-fw"></i>{% translate 'Admin-Bereich' %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user