From 08267025372f532e6c6a8ca455c68c3620590941 Mon Sep 17 00:00:00 2001 From: Khanh Ngo Date: Fri, 6 Apr 2018 13:22:09 +0700 Subject: [PATCH] Update config template --- app/views.py | 2 +- config_template.py | 2 +- configs/development.py | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views.py b/app/views.py index 0cb9bf9..2a02863 100644 --- a/app/views.py +++ b/app/views.py @@ -551,7 +551,7 @@ def domain(domain_name): if not re.search('ip6\.arpa|in-addr\.arpa$', domain_name): editable_records = app.config['RECORDS_ALLOW_EDIT'] else: - editable_records = app.config['REVERSE_ALLOW_EDIT'] + editable_records = app.config['REVERSE_RECORDS_ALLOW_EDIT'] return render_template('domain.html', domain=domain, records=records, editable_records=editable_records) else: for jr in jrecords: diff --git a/config_template.py b/config_template.py index 2a0766a..cbc4d2a 100644 --- a/config_template.py +++ b/config_template.py @@ -123,7 +123,7 @@ PDNS_VERSION = '4.1.1' # RECORDS ALLOWED TO EDIT RECORDS_ALLOW_EDIT = ['SOA', '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'] +REVERSE_RECORDS_ALLOW_EDIT = ['SOA', 'TXT', 'LOC', 'NS', 'PTR'] # EXPERIMENTAL FEATURES PRETTY_IPV6_PTR = False diff --git a/configs/development.py b/configs/development.py index 45ad679..f46b97a 100644 --- a/configs/development.py +++ b/configs/development.py @@ -111,10 +111,9 @@ PDNS_API_KEY = 'changeme' PDNS_VERSION = '4.1.1' # RECORDS ALLOWED TO EDIT -RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'PTR', 'SPF', 'SRV', 'TXT', 'NS'] - -# RECORDS ALLOWED TO EDIT FOR REVERSE DOMAINS -REVERSE_ALLOW_EDIT = ['PTR', 'NS'] +RECORDS_ALLOW_EDIT = ['SOA', '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 = ['SOA', 'TXT', 'LOC', 'NS', 'PTR'] # EXPERIMENTAL FEATURES PRETTY_IPV6_PTR = False