This commit is contained in:
Vasileios Markopoulos 2022-01-20 15:32:06 +01:00 committed by GitHub
commit 67325df9b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,6 @@ def domain(domain_name):
abort(500) abort(500)
quick_edit = Setting().get('record_quick_edit') quick_edit = Setting().get('record_quick_edit')
records_allow_to_edit = Setting().get_records_allow_to_edit()
forward_records_allow_to_edit = Setting( forward_records_allow_to_edit = Setting(
).get_forward_records_allow_to_edit() ).get_forward_records_allow_to_edit()
reverse_records_allow_to_edit = Setting( reverse_records_allow_to_edit = Setting(
@ -78,6 +77,11 @@ def domain(domain_name):
ttl_options = Setting().get_ttl_options() ttl_options = Setting().get_ttl_options()
records = [] records = []
if re.search(r'ip6\.arpa|in-addr\.arpa$', domain_name):
records_allow_to_edit = reverse_records_allow_to_edit
else:
records_allow_to_edit = forward_records_allow_to_edit
# Render the "records" to display in HTML datatable # Render the "records" to display in HTML datatable
# #
# BUG: If we have multiple records with the same name # BUG: If we have multiple records with the same name
@ -122,10 +126,7 @@ def domain(domain_name):
# Unsupported version # Unsupported version
abort(500) abort(500)
if not re.search(r'ip6\.arpa|in-addr\.arpa$', domain_name): editable_records = records_allow_to_edit
editable_records = forward_records_allow_to_edit
else:
editable_records = reverse_records_allow_to_edit
return render_template('domain.html', return render_template('domain.html',
domain=domain, domain=domain,