Code

Updated dns acls.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 11:03:44 +0000 (11:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 11:03:44 +0000 (11:03 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11746 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc

index a96de276d0298a37c0ca4d6b0c4bfd1aea6d5dcb..8d4f645afe66b1d04468a7f8311a0cc08f48ebb9 100644 (file)
@@ -111,7 +111,7 @@ class servdns extends goService
      */
     $smarty= get_smarty();
     $smarty->assign("dns_take_over",FALSE);
-    $smarty->assign("is_createable",$this->acl_is_writeable(""));
+    $smarty->assign("is_createable",$this->acl_is_createable());
     $display= "";
 
 
index 2a57dd2f50086e205f158e5016e670f2c88259bc..160790fab921c9626727f1ee1e87bbfb5a402407 100644 (file)
@@ -311,7 +311,7 @@ class servdnseditZone extends plugin
       }
     }
 
-    if($this->acl_is_writeable("mXRecord")){
+    if($this->parent->acl_is_writeable("mXRecord")){
       if((isset($_POST['AddMXRecord'])) && (!empty($_POST['StrMXRecord']))){
         $this->mXRecords[] = array("type"=>"mXRecord","value"=>trim($_POST['StrMXRecord']));      
       }
@@ -380,7 +380,9 @@ class servdnseditZone extends plugin
   {
     plugin::save_object();
 
-    if($this->acl_is_writeable("zoneRecords")){
+    if(!is_object($this->parent)) return;
+
+    if($this->parent->acl_is_writeable("zoneRecords")){
       foreach($this->Records as $id => $value){  
         if(isset($_POST['RecordTypeSelectedFor_'.$id])){
           $this->Records[$id]['type'] = $_POST['RecordTypeSelectedFor_'.$id];
@@ -390,7 +392,7 @@ class servdnseditZone extends plugin
         }
       }
     }
-    if(isset($_POST['NetworkClass']) && !$this->Zone_is_used && $this->acl_is_writeable("NetworkClass")){
+    if(isset($_POST['NetworkClass']) && !$this->Zone_is_used && $this->parent->acl_is_writeable("NetworkClass")){
       $this->NetworkClass = $_POST['NetworkClass'];
     }
   }