From 99ee92a703ab07286a61eb0a094ef7e9b7f27730 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 30 Nov 2006 12:05:40 +0000 Subject: [PATCH] ACL: Skip listing system snapshot that we are not able to restore. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5272 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 3100fd445..1ab430adb 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -604,8 +604,25 @@ class systems extends plugin function get_used_snapshot_bases() { $tmp = array(); - foreach(array("phones","servers","printers","terminals","netdevices","workstations") as $ent){ - $tmp[] = "ou=".$ent.",ou=systems,".$this->DivListSystem->selectedBase; + + /* Check acls, if we are not allowed to create and write each plugin tab, skip this object */ + + $tabs = array( + "terminal" => "ou=terminals,ou=systems,", + "workstation" => "ou=workstations,ou=systems,", + "server" => "ou=servers,ou=systems,", + "printer" => "ou=printers,ou=systems,", + "phone" => "ou=phones,ou=systems,", + "winworkstation" => get_winstations_ou(), + "component" => "ou=netdevices,ou=systems," + ); + + foreach($tabs as $acl_cat => $dn){ + + $acl_all = $this->ui->has_complete_category_acls($dn.$this->DivListSystem->selectedBase,$acl_cat); + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + $tmp[] = $dn.$this->DivListSystem->selectedBase; + } } return($tmp); } -- 2.30.2