From 7799097d3c0f53cf77953781d379d186ab681eea Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Oct 2008 12:10:43 +0000 Subject: [PATCH] Updated Systemanagement -Do not query for opsi hosts, if the user is not allowed allowed to. -Fixed listing, include compoenent ACLs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12754 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_divListSystem.inc | 4 ++-- .../systems/admin/systems/class_systemManagement.inc | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index 34b7bfa57..fdfc455de 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -49,8 +49,8 @@ class divListSystem extends MultiSelectWindow function divListSystem (&$config,$parent) { - $classes = array("server","workstation","terminal","phone","incoming","winworkstation","printer"); - if(class_available("opsigeneric")){ + $classes = array("server","workstation","terminal","phone","incoming","winworkstation","printer","component"); + if(class_available("opsiGeneric")){ $classes[] = "opsi"; } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 1be63ccb0..4db624009 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -1234,11 +1234,15 @@ class systems extends plugin $res = array_merge($res,get_list($filter,$sys_categories, get_ou('systemIncomingRDN').$base,$sys_attrs, GL_SIZELIMIT)); /* Append opsi systems, the opsi extension have to installed. + (Only, if we are allowed to view opsi hosts) */ if($this->opsi instanceof opsi && $this->opsi->enabled() && $this->DivListSystem->ShowOpsiHosts){ - $opsi_clients = $this->opsi->get_hosts_for_system_management(); - if($this->opsi->is_error()){ - msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG); + $o_acl = $this->ui->get_permissions($base,"opsi/opsiGeneric",""); + if(preg_match("/r/",$o_acl)){ + $opsi_clients = $this->opsi->get_hosts_for_system_management(); + if($this->opsi->is_error()){ + msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG); + } } } -- 2.30.2