From 1330ba968506444e40a2088fbf36b0198f90e8f5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 14 Oct 2008 13:30:50 +0000 Subject: [PATCH] Updated FAI Management List -Only list Opsi products, if we are allowed to view those git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12694 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiManagement.inc | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index a8afa4c75..b2b38756f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -1199,30 +1199,32 @@ class faiManagement extends plugin /* Append opsi objects, if opsi is available and if we are on the fai_base */ if($this->opsi instanceof opsi && $this->opsi->enabled()){ - - $err = FALSE; - if(!$err && $this->DivListFai->ShowOpsiNetboot){ - $n_pro = $this->opsi->get_netboot_products(); - $err |= $this->opsi->is_error(); - foreach($n_pro as $name => $data){ - $entry = array("cn" => $name, - "description" => $data['DESC'], - "type" => "opsi_netboot"); - $this->objects[$name."_opsi_netboot"] = $entry; - } - } - if(!$err && $this->DivListFai->ShowOpsiLocal){ - $l_pro = $this->opsi->get_local_products(); - $err |= $this->opsi->is_error(); - foreach($l_pro as $name => $data){ - $entry = array("cn" => $name, - "description" => $data['DESC'], - "type" => "opsi_local"); - $this->objects[$name."_opsi_local"] = $entry; + $opsi_acl = $this->ui->get_permissions($object['dn'],"opsi/opsiProperties"); + if(preg_match("/r/",$opsi_acl)){ + $err = FALSE; + if(!$err && $this->DivListFai->ShowOpsiNetboot){ + $n_pro = $this->opsi->get_netboot_products(); + $err |= $this->opsi->is_error(); + foreach($n_pro as $name => $data){ + $entry = array("cn" => $name, + "description" => $data['DESC'], + "type" => "opsi_netboot"); + $this->objects[$name."_opsi_netboot"] = $entry; + } + } + if(!$err && $this->DivListFai->ShowOpsiLocal){ + $l_pro = $this->opsi->get_local_products(); + $err |= $this->opsi->is_error(); + foreach($l_pro as $name => $data){ + $entry = array("cn" => $name, + "description" => $data['DESC'], + "type" => "opsi_local"); + $this->objects[$name."_opsi_local"] = $entry; + } } - } - if($err){ - msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG); + if($err){ + msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG); + } } } -- 2.30.2