From 11305f94e4b82397343c1128aa76e99133d47183 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 May 2008 12:26:29 +0000 Subject: [PATCH] Updated acl handling in system list. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11033 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_divListSystem.inc | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index d449f9c8a..fa8cbdb11 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -213,6 +213,7 @@ class divListSystem extends MultiSelectWindow $s = ".|"._("Actions")."|\n"; $s.= "..|". " "._("Create")."|\n"; + if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"terminal/termgeneric"))){ $s.= "...|". " "._("Terminal")."|"."newsystem_terminal|\n"; @@ -258,26 +259,23 @@ class divListSystem extends MultiSelectWindow $s.= "..|". " "._("Activate systems")."|activate_multiple|\n"; - /* Add multiple copy & cut icons */ - if(is_object($this->parent->CopyPasteHandler)){ + if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$all_module_acls)){ $s.= "..|---|\n"; $s.= "..|". " "._("Copy")."|"."multiple_copy_systems|\n"; - $s.= "..|". - " "._("Cut")."|"."multiple_cut_systems|\n"; + if(is_object($this->parent->CopyPasteHandler) && preg_match("/(r.*d|d.*r)/",$all_module_acls)){ + $s.= "..|". + " "._("Cut")."|"."multiple_cut_systems|\n"; + } } - /* Get copy & paste icon */ - $Copy_Paste =""; - if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){ - $s .= "..|---|\n"; - if($this->parent->CopyPasteHandler->entries_queued()){ - $img = ""; - $s.="..|".$img." "._("Paste")."|editPaste|\n"; - }else{ - $img = ""; - $s.="..|".$img." "._("Paste")."\n"; - } + /* Copy & paste icons */ + if(is_object($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler->entries_queued()){ + $img = ""; + $s.="..|".$img." "._("Paste")."|editPaste|\n"; + }else{ + $img = ""; + $s.="..|".$img." "._("Paste")."\n"; } /* Add snapshot icons */ @@ -383,21 +381,31 @@ class divListSystem extends MultiSelectWindow $acl = $ui->get_permissions($val['dn'],$tabs[$type]['ACL']); $action =""; - if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ - $action.= "parent->CopyPasteHandler){ + $action .= " "; + }else{ + $action.="  "; + } + + if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){ $action.= " "; + }else{ + $action.="  "; } + $action.= ""; - if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + + /* Add snapshot icon */ + if(preg_match("/(r.*w|w.*r)/",$acl_all)){ $action.= $this->GetSnapShotActions($val['dn']); }else{ - $action.= $empty." ".$empty." "; + $action.="  "; + $action.="  "; } - if(preg_match("/d/",$acl)){ $action.= ""; -- 2.30.2