From: hickert Date: Wed, 29 Aug 2007 09:35:16 +0000 (+0000) Subject: Updated dhcp service for trunk, not complete at all X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=22c52045c0e2d96d533c642ab6522ed182473420;p=gosa.git Updated dhcp service for trunk, not complete at all git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7163 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 168d7a8e8..fbb7b727e 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -48,7 +48,6 @@ class servdhcp extends plugin if (!count($this->dhcpSections)){ $this->is_account= FALSE; } - } @@ -57,6 +56,8 @@ class servdhcp extends plugin /* Call parent execute */ plugin::execute(); + $this->reload(); + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; @@ -151,7 +152,7 @@ class servdhcp extends plugin /* Remove section? */ if (isset($_POST['delete_dhcp_confirm'])){ - if (chkacl($this->acl, "delete") == ""){ + if ($this->acl_is_removeable()){ unset($this->dhcpSections[$this->current_object]); unset($this->dhcpObjectCache[$this->current_object]); $this->dhcpObjectCache[$this->current_object]= array(); @@ -211,8 +212,8 @@ class servdhcp extends plugin /* Show tab dialog headers */ if ($this->is_account){ - $display= $this->show_header(_("Remove DHCP service"), - _("This server has DHCP features enabled. You can disable them by clicking below.")); +# $display= $this->show_header(_("Remove DHCP service"), +# _("This server has DHCP features enabled. You can disable them by clicking below.")); if (!count($this->dhcpObjectCache)){ $attrs= array(); @@ -230,8 +231,9 @@ class servdhcp extends plugin } } else { - $display= $this->show_header(_("Add DHCP service"), - _("This server has DHCP features disabled. You can enable them by clicking below.")); +# $display= $this->show_header(_("Add DHCP service"), + +# _("This server has DHCP features disabled. You can enable them by clicking below.")); return ($display); } @@ -282,8 +284,6 @@ class servdhcp extends plugin } } - $smarty->assign("dhcpACL",chkacl($this->acl,"servdhcp")); - /* Display tempalte */ $smarty->assign("DhcpList",$DhcpList->DrawList()); $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE)); @@ -452,8 +452,11 @@ class servdhcp extends plugin $ui= get_userinfo(); $me= $this->dn; - $list= get_list("(&(objectClass=dhcpService)(|(dhcpPrimaryDN=$me)(dhcpSecondaryDN=$me)(dhcpServerDN=$me)(dhcpFailOverPeerDN=$me)))", $ui->subtreeACL, $this->config->current['BASE'], array("cn")); + $filter = "(&(objectClass=dhcpService)(|(dhcpPrimaryDN=$me)(dhcpSecondaryDN=$me)(dhcpServerDN=$me)(dhcpFailOverPeerDN=$me)))"; + + $list= get_list($filter, array("server"), $this->config->current['BASE'], array("cn"),GL_SIZELIMIT | GL_SUBSEARCH); $final= array(); + foreach ($list as $value){ /* Set header */ @@ -544,6 +547,29 @@ class servdhcp extends plugin return ($type); } + + /* Return plugin informations for acl handling */ + function plInfo() + { + return (array( + "plShortName" => _("DHCP service"), + "plDescription" => _("DHCP service")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 84, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array( + "cn" => _("Blalalasasd"), + "dhcpPrimaryDN" => _("KEkse"), + "dhcpSecondaryDN" => _("KEkse2"), + "dhcpServerDN" => _("KEkse3"), + "dhcpFailOverPeerDN"=> _("KEkse4"), + "dhcpOptions" => _("blabla")) + )); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/systems/servdhcp.tpl b/plugins/admin/systems/servdhcp.tpl index 76739f150..4961b5017 100644 --- a/plugins/admin/systems/servdhcp.tpl +++ b/plugins/admin/systems/servdhcp.tpl @@ -3,7 +3,7 @@ {$DhcpList} - +