From: hickert Date: Wed, 15 Oct 2008 11:44:34 +0000 (+0000) Subject: Updated Opsi ACLs. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0820e0e3191b68ccebda7491f0c6e7b6268cffe5;p=gosa.git Updated Opsi ACLs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12705 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc index fc66b2997..0340f1cd3 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc @@ -317,28 +317,30 @@ class opsiGeneric extends plugin /* Create list of selected local products */ ksort($this->a_selectedLocalProducts); - foreach($this->a_selectedLocalProducts as $name => $data){ + if($this->acl_is_readable("localProduct")){ + foreach($this->a_selectedLocalProducts as $name => $data){ - $name_tab = array("string" => $name); - $desc_tab = array( - "string" => "
".$data['DESC']."
", - "attach" => "title='".$data['DESC']."'"); + $name_tab = array("string" => $name); + $desc_tab = array( + "string" => "
".$data['DESC']."
", + "attach" => "title='".$data['DESC']."'"); - /* Only display edit button, if there is something to edit - */ - $edit = " "; - if(count($data['CFG'])){ - $edit = ""; - } - $del = ""; + /* Only display edit button, if there is something to edit + */ + $edit = " "; + if(count($data['CFG'])){ + $edit = ""; + } + $del = ""; - $opt_tab = array("string" => $edit.$del, - "attach" => "style='border-right:0px; width: 40px; text-align:right;'"); + $opt_tab = array("string" => $edit.$del, + "attach" => "style='border-right:0px; width: 40px; text-align:right;'"); - if($this->acl_is_writeable("localProduct")){ - $divSLP->AddEntry(array($name_tab,$desc_tab,$opt_tab)); - }else{ - $divSLP->AddEntry(array($name_tab,$desc_tab)); + if($this->acl_is_writeable("localProduct")){ + $divSLP->AddEntry(array($name_tab,$desc_tab,$opt_tab)); + }else{ + $divSLP->AddEntry(array($name_tab,$desc_tab)); + } } } @@ -556,10 +558,14 @@ class opsiGeneric extends plugin $pro = $this->dialog->get_product(); $CFG = $this->dialog->get_cfg(); if(isset($this->a_selectedLocalProducts[$pro])){ - $this->a_selectedLocalProducts[$pro]['CFG'] = $CFG; + if($this->acl_is_writeable("localProduct")){ + $this->a_selectedLocalProducts[$pro]['CFG'] = $CFG; + } $this->dialog = NULL; }elseif($this->s_selectedNetbootProduct == $pro){ - $this->a_availableNetbootProducts[$pro]['CFG'] = $CFG; + if($this->acl_is_writeable("netbootProduct")){ + $this->a_availableNetbootProducts[$pro]['CFG'] = $CFG; + } $this->dialog = NULL; }else{ trigger_error("Fatal, unknown product was configured.");