From 68fe7c0e567aafeddefb8898ff1f83584b50033d Mon Sep 17 00:00:00 2001 From: Rauno Tuul Date: Wed, 1 Mar 2023 18:43:47 +0200 Subject: [PATCH] Standard user domain records list performance loop improvement --- powerdnsadmin/routes/domain.py | 3 ++- powerdnsadmin/templates/domain.html | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/powerdnsadmin/routes/domain.py b/powerdnsadmin/routes/domain.py index 9742760..5fef976 100644 --- a/powerdnsadmin/routes/domain.py +++ b/powerdnsadmin/routes/domain.py @@ -133,7 +133,8 @@ def domain(domain_name): editable_records=editable_records, quick_edit=quick_edit, ttl_options=ttl_options, - current_user=current_user) + current_user=current_user, + allow_user_view_history=Setting().get('allow_user_view_history')) @domain_bp.route('/remove', methods=['GET', 'POST']) diff --git a/powerdnsadmin/templates/domain.html b/powerdnsadmin/templates/domain.html index 026a89b..9660d38 100755 --- a/powerdnsadmin/templates/domain.html +++ b/powerdnsadmin/templates/domain.html @@ -36,7 +36,7 @@  Zone Settings {% endif %} - {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} + {% if current_user.role.name in ['Administrator', 'Operator'] or allow_user_view_history %} {% endif %} - {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} + {% if current_user.role.name in ['Administrator', 'Operator'] or allow_user_view_history %}