From e920bf5009056b15fc9e1a5141089928c6bd0fab Mon Sep 17 00:00:00 2001 From: corubba Date: Thu, 23 Jun 2022 22:22:05 +0200 Subject: [PATCH] Fix broken code PR #1089 is the culprit, as was already predicted in the review. --- powerdnsadmin/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerdnsadmin/decorators.py b/powerdnsadmin/decorators.py index 6382141..50e4a3f 100644 --- a/powerdnsadmin/decorators.py +++ b/powerdnsadmin/decorators.py @@ -388,7 +388,7 @@ def apikey_can_configure_dnssec(http_methods=[]): def allowed_record_types(f): @wraps(f) def decorated_function(*args, **kwargs): - if request.method == 'GET': + if request.method in ['GET', 'DELETE', 'PUT']: return f(*args, **kwargs) if g.apikey.role.name in ['Administrator', 'Operator']: