mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Fix broken audit links for normal users
This commit is contained in:
parent
333dd60b32
commit
5fb01f01bf
@ -11,6 +11,6 @@ Audit Log
|
||||
{% from "macros/audit_log.html" import render_audit_log %}
|
||||
|
||||
{{ render_pagination(pagination, url_set_query) }}
|
||||
{{ render_audit_log(log) }}
|
||||
{{ render_audit_log(log, current_user) }}
|
||||
{{ render_pagination(pagination, url_set_query) }}
|
||||
{% endblock %}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{% macro render_audit_log(log) -%}
|
||||
{% macro render_audit_log(log, current_user) -%}
|
||||
<div class="list-group mt-3">
|
||||
{% for entry in log %}
|
||||
<a class="list-group-item list-group-item-action"
|
||||
{% if entry.description %}
|
||||
{% if entry.description and current_user.rank.atLeast(current_user.rank.MODERATOR) %}
|
||||
href="{{ url_for('admin.audit_view', id=entry.id) }}">
|
||||
{% else %}
|
||||
href="{{ entry.url }}">
|
||||
|
@ -66,7 +66,7 @@
|
||||
<h3>{{ _("Recent Account Actions") }}</h3>
|
||||
|
||||
{% from "macros/audit_log.html" import render_audit_log %}
|
||||
{{ render_audit_log(user.audit_log_entries.limit(10).all()) }}
|
||||
{{ render_audit_log(user.audit_log_entries.limit(10).all(), current_user) }}
|
||||
|
||||
<h3>{{ _("Account Deletion and Deactivation") }}</h3>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user