From 27b0be9ad05c86d6a04a79b914e05442d9b4fb39 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Oct 2006 10:59:17 +0000 Subject: [PATCH] Added delete button in result window git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4884 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiHook.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 141765b45..6b41d8244 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -281,6 +281,7 @@ class faiHook extends plugin $acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry") ; $act = ""; + /* Check if this object is freezed, in this case hide the delete icon */ if($this->FAIstate == "freeze"){ $act .= ""; }else{ @@ -290,6 +291,7 @@ class faiHook extends plugin } } + /* Check if we are allowed to use the export button for this object */ $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","FAIscript") ; if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new") || !preg_match("/r/",$s_acl)){ $down = ""; @@ -299,10 +301,14 @@ class faiHook extends plugin "; } - $divlist->AddEntry(array( array("string"=>$name['name']), - array("string"=>$down , "attach" => "style='width:20px;'"), - array("string"=>str_replace("%s",base64_encode($key),$act), - "attach"=>"style='border-right: 0px;width:50px;text-align:right;'"))); + /* Check if we are allowed to view the object */ + $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","cn") ; + if(preg_match("/r/",$s_acl)){ + $divlist->AddEntry(array( array("string"=>$name['name']), + array("string"=>$down , "attach" => "style='width:20px;'"), + array("string"=>str_replace("%s",base64_encode($key),$act), + "attach"=>"style='border-right: 0px;width:50px;text-align:right;'"))); + } } $smarty->assign("Entry_divlist",$divlist->DrawList()); /* Divlist creation complete -- 2.30.2