From f748347eb37acb0373aadafb084b92fc27f78b87 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 23 Oct 2008 13:50:28 +0000 Subject: [PATCH] Updated workstation startup ACLs. -Fixed display of fai classes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12772 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_workstationStartup.inc | 99 ++++++++++--------- 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 0235937ba..33d671a86 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -607,10 +607,15 @@ class workstartup extends plugin $div = new divSelectBox("WSFAIscriptClasses"); $div -> SetHeight("110"); - $str_up = "  "; - $str_down = "  "; - $str_remove = "  "; + $str_empty = "  \"\""; + if($this->acl_is_writeable("FAIclass")){ + $str_up = "  "; + $str_down = "  "; + $str_remove = "  "; + }else{ + $str_up=$str_down=$str_remove=$str_empty; + } /* Get classes */ if($this->FAIdebianMirror == "inherited"){ @@ -624,57 +629,59 @@ class workstartup extends plugin /* Draw every single entry */ $i = 1; - foreach($tmp as $class){ + if($this->acl_is_readable("FAIclass")){ + foreach($tmp as $class){ - /* Mark invalid classes. (Not in selected release) - */ - $marker = ""; - if(in_array_ics($class,$invalid)){ - $marker = " ("._("Not available in current setup").")"; - } + /* Mark invalid classes. (Not in selected release) + */ + $marker = ""; + if(in_array_ics($class,$invalid)){ + $marker = " ("._("Not available in current setup").")"; + } - /* Create up/down priority icons - * Skip this, if we have inherited the FAI classes. - */ - if($this->FAIdebianMirror == "inherited"){ - $str = ""; - }else{ - if($i==1){ - $str = $str_empty.$str_down.$str_remove; - }elseif($i == count($this->FAIclass)){ - $str = $str_up.$str_empty.$str_remove; + /* Create up/down priority icons + * Skip this, if we have inherited the FAI classes. + */ + if($this->FAIdebianMirror == "inherited"){ + $str = ""; }else{ - $str = $str_up.$str_down.$str_remove; + if($i==1){ + $str = $str_empty.$str_down.$str_remove; + }elseif($i == count($this->FAIclass)){ + $str = $str_up.$str_empty.$str_remove; + }else{ + $str = $str_up.$str_down.$str_remove; + } } - } - $i ++ ; - - /* Get Description tag - * There may be several FAI objects with the same class name, - * use the description from FAIprofile, if possible. - */ - $desc = ""; - if(isset($this->cache['CLASSES'][$this->FAIrelease][$class])){ - foreach($this->cache['CLASSES'][$this->FAIrelease][$class] as $types ){ - if(isset($types['Desc'])){ - $desc= $types['Desc']; - if($types['Type'] == "FAIprofile"){ - break; + $i ++ ; + + /* Get Description tag + * There may be several FAI objects with the same class name, + * use the description from FAIprofile, if possible. + */ + $desc = ""; + if(isset($this->cache['CLASSES'][$this->FAIrelease][$class])){ + foreach($this->cache['CLASSES'][$this->FAIrelease][$class] as $types ){ + if(isset($types['Desc'])){ + $desc= $types['Desc']; + if($types['Type'] == "FAIprofile"){ + break; + } } } } - } - if(!empty($desc)){ - $desc = " [".trim($desc)."]"; - } - - $div->AddEntry(array( - array("string"=>$class.$desc.$marker), - array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'") - )); - } - $smarty->assign("FAIScriptlist",$div->DrawList()); + if(!empty($desc)){ + $desc = " [".trim($desc)."]"; + } + + $div->AddEntry(array( + array("string"=>$class.$desc.$marker), + array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'") + )); + } + }// END FAI output generation }// END FAI output generation + $smarty->assign("FAIScriptlist",$div->DrawList()); /* Radio button group */ if (preg_match("/G/", $this->bootmode)) { -- 2.30.2