From 08c493a643fcdd5fa07d810be9f62811809c6630 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 24 May 2018 16:12:30 +0200
Subject: [PATCH] Make update_acl field visible to admins only in dns SOA.

---
 interface/web/dns/form/dns_soa.tform.php     | 3 ++-
 interface/web/dns/templates/dns_soa_edit.htm | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php
index 910b2e6bb..6fab657ba 100644
--- a/interface/web/dns/form/dns_soa.tform.php
+++ b/interface/web/dns/form/dns_soa.tform.php
@@ -319,6 +319,7 @@ $form["tabs"]['dns_records'] = array (
 	)
 );
 
-
+// show update acl to admins only.
+if(!$app->auth->is_admin()) unset($form["tabs"]['dns_soa']['fields']['update_acl']);
 
 ?>
diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm
index 87853d1ed..94faec4fa 100644
--- a/interface/web/dns/templates/dns_soa_edit.htm
+++ b/interface/web/dns/templates/dns_soa_edit.htm
@@ -120,10 +120,11 @@
             <div class="form-group">
                 <label for="also_notify" class="col-sm-3 control-label">{tmpl_var name='also_notify_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="also_notify" id="also_notify" value="{tmpl_var name='also_notify'}" class="form-control" /></div></div>
-            <div class="form-group">
+            <tmpl_if name="is_admin">
+			<div class="form-group">
                 <label for="update_acl" class="col-sm-3 control-label">{tmpl_var name='update_acl_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="update_acl" id="update_acl" value="{tmpl_var name='update_acl'}" class="form-control" /></div></div>
-                
+            </tmpl_if>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                 <div class="col-sm-9">
-- 
GitLab