From 7e05f73e09a5f5fbbcd8913482a9f3157acbd51b Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Oct 2006 04:26:51 +0000 Subject: [PATCH] Fixed export/edit/remove acls for fai-script. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4881 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiScript.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index 5516f19d5..73f536de1 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -270,6 +270,7 @@ class faiScript extends plugin $acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry") ; $act = ""; + /* Hide delete icon if this object is freezed */ if($this->FAIstate == "freeze"){ $act .= ""; }else{ @@ -279,6 +280,7 @@ class faiScript extends plugin } } + /* Check acls for download icon */ $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 = ""; @@ -288,10 +290,14 @@ class faiScript 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 this 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()); -- 2.30.2