also make record types configurable for reverse zones

This commit is contained in:
Mike Rhyner 2017-12-06 00:32:29 +01:00
parent 91da1eeb98
commit f2595216fd
2 changed files with 3 additions and 2 deletions

View file

@ -321,7 +321,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 = ['PTR']
editable_records = app.config['REVERSE_ALLOW_EDIT']
return render_template('domain.html', domain=domain, records=records, editable_records=editable_records)
else:
return redirect(url_for('error', code=404))

View file

@ -75,7 +75,8 @@ PDNS_API_KEY = 'you never know'
PDNS_VERSION = '3.4.7'
# RECORDS ALLOWED TO EDIT
RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT']
RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT','NS']
REVERSE_ALLOW_EDIT = ['PTR','NS']
# EXPERIMENTAL FEATURES
PRETTY_IPV6_PTR = False