From cd908b227bcbdd35837e1105f6bbfde220b4f9e3 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 28 Apr 2008 08:34:09 +0000 Subject: [PATCH] Updated fai package handling -Added ACL checks to list actions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10708 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiPackage.inc | 23 +++++++++++-------- gosa-plugins/fai/admin/fai/faiPackage.tpl | 9 -------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 868176577..b4dcfa82b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -236,9 +236,8 @@ class faiPackage extends plugin ******/ if(!preg_match('/^freeze/', $this->FAIstate) && preg_match("/^remove_package_/",$name)){ $id = @base64_decode(preg_replace("/^remove_package_(.*)_[xy]*$/","\\1",$name)); - if(isset($this->usedPackages[$id])){ - $this->usedPackages[$id]; + unset($this->usedPackages[$id]); } break; } @@ -352,13 +351,19 @@ class faiPackage extends plugin if(isset($this->list[$usedName]['DESCRIPTION'])){ $description = $this->list[$usedName]['DESCRIPTION']; } - - $actions = ""; - $actions.= " "; - $actions.= " "; + + if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){ + $actions = ""; + } + if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIdebconfInfo")){ + $actions.= " "; + } + if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){ + $actions.= " "; + } $field1 = array("string" => $configured." ".$removal,"attach" => "style='width:40px;'"); $field2 = array("string" => $usedName ,"attach" => "style='width:200px;'"); diff --git a/gosa-plugins/fai/admin/fai/faiPackage.tpl b/gosa-plugins/fai/admin/fai/faiPackage.tpl index df3e5cfd2..c5bcd2d13 100644 --- a/gosa-plugins/fai/admin/fai/faiPackage.tpl +++ b/gosa-plugins/fai/admin/fai/faiPackage.tpl @@ -73,15 +73,6 @@
{render acl=$FAIpackageACL} -{/render} -{render acl=$FAIpackageACL} - -{/render} -{render acl=$FAIdebconfInfoACL} - -{/render} -{render acl=$FAIpackageACL} - {/render} -- 2.30.2