From 9bf74a6baf1cb6d375fd1cb08a68a472243e5892 Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Tue, 6 Sep 2022 15:25:28 +0200 Subject: [PATCH] admin_edit_key: default to User role for new api keys hopefully this will prevent accidental administator api keys from being created --- powerdnsadmin/templates/admin_edit_key.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/powerdnsadmin/templates/admin_edit_key.html b/powerdnsadmin/templates/admin_edit_key.html index 7c8ca17..6a94340 100644 --- a/powerdnsadmin/templates/admin_edit_key.html +++ b/powerdnsadmin/templates/admin_edit_key.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% set active_page = "admin_keys" %} -{% if create or (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{%else %}{% set hide_opts = False %}{% endif %} +{% if (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{%else %}{% set hide_opts = False %}{% endif %} {% block title %} Edit Key - {{ SITE_NAME }} {% endblock %} @@ -39,7 +39,9 @@