Code

Fixed remove from parent for dns extension
[gosa.git] / plugins / admin / systems / class_servGeneric.inc
index 30ee0acac002cc04f680634225435dbd86b402ee..9039ef07700d2b91da296d60dcdd217ab5cae58b 100644 (file)
@@ -60,6 +60,7 @@ class servgeneric extends plugin
       $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
     }
     $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+    $this->netConfigDNS->acl = $this->acl;
     /* Save dn for later references */
     $this->orig_dn= $this->dn;
   }
@@ -67,6 +68,7 @@ class servgeneric extends plugin
   function execute()
   {
     /* Call parent execute */
+    $this->netConfigDNS->acl = $this->acl;
     plugin::execute();
 
     /* Do we represent a valid server? */
@@ -77,7 +79,7 @@ class servgeneric extends plugin
     }
 
     /* Check for action */
-    if (isset($_POST['action'])){
+    if (isset($_POST['action']) && chkacl($this->acl,"FAIstate") == ""){
       $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
       if ($cmd == ""){
         print_red(_("No ACTIONCMD definition found in your gosa.conf"));
@@ -195,6 +197,7 @@ class servgeneric extends plugin
 
   function remove_from_parent()
   {
+    $this->netConfigDNS->acl = $this->acl;
     $this->netConfigDNS->remove_from_parent();
     $ldap= $this->config->get_ldap_link();
     $ldap->rmdir($this->dn);
@@ -267,6 +270,7 @@ class servgeneric extends plugin
   /* Save to LDAP */
   function save()
   {
+    $this->netConfigDNS->acl = $this->acl;
     plugin::save();
 
     /* Remove all empty values */