Code

Added acls for printer glpi
[gosa.git] / plugins / admin / systems / class_servDNS.inc
index e532daba3881fabe1218a8364f34dc4bcb11e000..997a8ad00fc0efbb481707c4cc0c3e86d76b1c71 100644 (file)
@@ -25,9 +25,9 @@ class servdns extends plugin
   var $DisplayName      = "";
   var $StatusFlag       = "";
 
-  function servdns ($config, $dn= NULL)
+  function servdns ($config, $dn= NULL, $parent= NULL)
   {
-    plugin::plugin ($config, $dn);
+    plugin::plugin ($config, $dn, $parent);
 
     $this->DisplayName = _("Domain name system service");
 
@@ -70,10 +70,10 @@ class servdns extends plugin
     }
 
     if ($this->is_account){
-      $display= $this->show_header(_("Remove DNS service"),
+      $display= $this->show_disable_header(_("Remove DNS service"),
           _("This server has DNS features enabled. You can disable them by clicking below."));
     } else {
-      $display= $this->show_header(_("Add DNS service"),
+      $display= $this->show_enable_header(_("Add DNS service"),
           _("This server has DNS features disabled. You can enable them by clicking below."));
       return ($display);
     }
@@ -285,7 +285,7 @@ class servdns extends plugin
       foreach($tmp['zoneUpdates'] as $dn => $attrs){
         $ldap->cd($dn);
         $ldap->modify($attrs);
-        show_ldap_error("Zone:".$ldap->get_error(), _("Updating DNS service failed"));
+        show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn));
       }
     }
 
@@ -294,7 +294,7 @@ class servdns extends plugin
     foreach($tmp['del'] as $dn => $del){
       $ldap->cd($dn);
       $ldap->rmdir_recursive($dn);
-      show_ldap_error($ldap->get_error(), _("Removing DNS entries failed"));
+      show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn));
     }
 
     /* move follwoing entries
@@ -315,7 +315,7 @@ class servdns extends plugin
         $ldap->cd($dn);
         $ldap->add($attrs);
       }
-      show_ldap_error($ldap->get_error(), _("Saving DNS entries failed"));
+      show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
     }
   }
 
@@ -339,7 +339,7 @@ class servdns extends plugin
       $attrs[$flag] = $value;
       $this->$flag = $value;
       $ldap->modify($attrs);
-      show_ldap_error($ldap->get_error());
+      show_ldap_error($ldap->get_error(), sprintf(_("Set status flag for system server/dns with dn '%s' failed."),$this->dn));
       $this->action_hook();
     }
   }
@@ -381,6 +381,34 @@ class servdns extends plugin
       $this->$flag = $attrs[$flag][0];
     }
   }
+
+
+  /* Return plugin informations for acl handling */
+  function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("DNS"),
+          "plDescription" => _("DNS service"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 0,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("server"),
+
+          "plProvidedAcls"=> array(
+            "zoneName"      =>_("Zone name"),
+            "ReverseZone"   =>_("Reverse zone"),
+            "sOAprimary"    =>_("Primary dns server"),
+            "sOAmail"       =>_("Mail address"),
+            "sOAserial"     =>_("Serial"),
+            "sOArefresh"    =>_("Refresh"),
+            "sOAretry"      =>_("Retry"),
+            "sOAexpire"     =>_("Expire"),
+            "sOAttl"        =>_("TTL"),
+            "zoneRecords"   =>_("Zone records"))
+    ));
+  }
+
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>