From b832fc176838270411e010c53582a3270a9e27e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Feb 2018 21:02:16 +0200 Subject: [PATCH] Reverse zone PTR type entries not shown bug fix. Added NS, LOC and TXT types in reverse zones. Added LOC type in forward zone. --- app/views.py | 4 ++-- config_template.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views.py b/app/views.py index a263d64..5bfe082 100644 --- a/app/views.py +++ b/app/views.py @@ -476,9 +476,9 @@ def domain(domain_name): record = Record(name=jr['name'], type=jr['type'], status='Disabled' if jr['disabled'] else 'Active', ttl=jr['ttl'], data=jr['content']) records.append(record) if not re.search('ip6\.arpa|in-addr\.arpa$', domain_name): - editable_records = app.config['RECORDS_ALLOW_EDIT'] + editable_records = app.config['FORWARD_RECORDS_ALLOW_EDIT'] else: - editable_records = ['PTR'] + editable_records = app.config['REVERSE_RECORDS_ALLOW_EDIT'] return render_template('domain.html', domain=domain, records=records, editable_records=editable_records) diff --git a/config_template.py b/config_template.py index ed1ec68..009713f 100644 --- a/config_template.py +++ b/config_template.py @@ -113,7 +113,9 @@ PDNS_API_KEY = 'you never know' PDNS_VERSION = '3.4.7' # RECORDS ALLOWED TO EDIT -RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'PTR', 'SPF', 'SRV', 'TXT'] +RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'PTR', 'SPF', 'SRV', 'TXT', 'LOC', 'NS', 'PTR'] +FORWARD_RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'PTR', 'SPF', 'SRV', 'TXT', 'LOC' 'NS'] +REVERSE_RECORDS_ALLOW_EDIT = ['TXT', 'LOC', 'NS', 'PTR'] # EXPERIMENTAL FEATURES PRETTY_IPV6_PTR = False