From: hickert Date: Thu, 3 Jul 2008 12:53:33 +0000 (+0000) Subject: Updated system management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0ee04aa3c98fa461dcd83dc5318f1fc06d1054b4;p=gosa.git Updated system management -Only list object/checkboxes that are readable, selectable. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11525 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index 89838f7ff..fd8153a02 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -94,27 +94,42 @@ class divListSystem extends MultiSelectWindow $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'")); /* Text ,Value ,Name ,Is selected */ - $this->AddCheckBox("ShowServers", - msgPool::selectToView( _("servers")), - sprintf(_("Show %s"), _("servers")),true); - $this->AddCheckBox("ShowTerminals", - msgPool::selectToView( _("Linux terminals")), - sprintf(_("Show %s"), _("terminals")),true); - $this->AddCheckBox("ShowWorkstations", - msgPool::selectToView( _("Linux workstations")), - sprintf(_("Show %s"), _("workstations")),true); - $this->AddCheckBox("ShowWinWorkstations", - msgPool::selectToView( _("MicroSoft Windows based workstations")), - sprintf(_("Show %s"), _("windows based workstations")),true); - $this->AddCheckBox("ShowPrinters", - msgPool::selectToView( _("network printers")), - sprintf(_("Show %s"), _("network printers")) ,true); - $this->AddCheckBox("ShowPhones", - msgPool::selectToView( _("VoIP phones")), - sprintf(_("Show %s"), _("phones")) ,true); - $this->AddCheckBox("ShowDevices", - msgPool::selectToView( _("network devices")), - sprintf(_("Show %s"), _("network devices")), true); + + if(class_available("servtabs")){ + $this->AddCheckBox("ShowServers", + msgPool::selectToView( _("servers")), + sprintf(_("Show %s"), _("servers")),true); + } + if(class_available("termtabs")){ + $this->AddCheckBox("ShowTerminals", + msgPool::selectToView( _("Linux terminals")), + sprintf(_("Show %s"), _("terminals")),true); + } + if(class_available("worktabs")){ + $this->AddCheckBox("ShowWorkstations", + msgPool::selectToView( _("Linux workstations")), + sprintf(_("Show %s"), _("workstations")),true); + } + if(class_available("wintabs")){ + $this->AddCheckBox("ShowWinWorkstations", + msgPool::selectToView( _("MicroSoft Windows based workstations")), + sprintf(_("Show %s"), _("windows based workstations")),true); + } + if(class_available("printtabs")){ + $this->AddCheckBox("ShowPrinters", + msgPool::selectToView( _("network printers")), + sprintf(_("Show %s"), _("network printers")) ,true); + } + if(class_available("phonetabs")){ + $this->AddCheckBox("ShowPhones", + msgPool::selectToView( _("VoIP phones")), + sprintf(_("Show %s"), _("phones")) ,true); + } + if(class_available("componenttabs")){ + $this->AddCheckBox("ShowDevices", + msgPool::selectToView( _("network devices")), + sprintf(_("Show %s"), _("network devices")), true); + } /* Add SubSearch checkbox */ $this->AddCheckBox(SEPERATOR); diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index ba4055ea0..fbb80498e 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -1314,13 +1314,13 @@ class systems extends plugin /* This array represents the combination between checkboxes and search filters */ $objs = array( - "ShowServers" => array("CLASS" => "goServer" ,"TREE" => get_ou('serverou')), - "ShowTerminals" => array("CLASS" => "gotoTerminal" ,"TREE" => get_ou('terminalou')), - "ShowPrinters" => array("CLASS" => "gotoPrinter" ,"TREE" => get_ou('printerou')), - "ShowDevices" => array("CLASS" => "ieee802Device" ,"TREE" => get_ou('componentou')), - "ShowPhones" => array("CLASS" => "goFonHardware" ,"TREE" => get_ou('phoneou')), - "ShowWorkstations" => array("CLASS" => "gotoWorkstation" ,"TREE" => get_ou('workstationou')), - "ShowWinWorkstations"=> array("CLASS" => $samba ,"TREE" => get_winstations_ou() )); + "ShowServers" => array("TAB" => "servtabs", "CLASS" => "goServer" ,"TREE" => get_ou('serverou')), + "ShowTerminals" => array("TAB" => "termtabs", "CLASS" => "gotoTerminal" ,"TREE" => get_ou('terminalou')), + "ShowPrinters" => array("TAB" => "printtabs", "CLASS" => "gotoPrinter" ,"TREE" => get_ou('printerou')), + "ShowDevices" => array("TAB" => "componenttabs", "CLASS" => "ieee802Device" ,"TREE" => get_ou('componentou')), + "ShowPhones" => array("TAB" => "phonetabs", "CLASS" => "goFonHardware" ,"TREE" => get_ou('phoneou')), + "ShowWorkstations" => array("TAB" => "worktabs", "CLASS" => "gotoWorkstation" ,"TREE" => get_ou('workstationou')), + "ShowWinWorkstations"=> array("TAB" => "wintabs", "CLASS" => $samba ,"TREE" => get_winstations_ou() )); /* Include the 'Display Systems of user' attribute */ if ((!empty($this->DivListSystem->UserRegex)) && ($this->DivListSystem->UserRegex!= "*")){ @@ -1339,7 +1339,8 @@ class systems extends plugin /* Walk through all possible search combinations, and search for some objects if the checkbox is enabled */ foreach($objs as $checkBox => $oc){ - if($this->DivListSystem->$checkBox){ + + if($this->DivListSystem->$checkBox && class_available($oc['TAB'])){ if($this->DivListSystem->SubSearch){ if($oc['CLASS'] != ""){ $filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";