Code

Added faiPackage acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Oct 2006 06:27:44 +0000 (06:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Oct 2006 06:27:44 +0000 (06:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4920 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackage.inc

index 54589793a222a71d5e126113bfc3c6ebb8add786..bb06019cd064a4d132405ccef8579f9b525b5367 100644 (file)
@@ -217,13 +217,13 @@ class faiPackage extends plugin
     $this->list=$this->genPkgs();
 
     /* + was pressed to open the package dialog */
-    if(isset($_POST['Addpkg'])){
+    if(isset($_POST['Addpkg']) && $this->acl_is_writeable("FAIpackage")){
       $this->dialog = new faiPackageEntry($this->config, $this->dn,$this->list,$this->usedPackages);
       $this->is_dialog =true;
     }
 
     /* Delte selected package */ 
-    if(isset($_POST['Delpkg'])){
+    if(isset($_POST['Delpkg']) && $this->acl_is_writeable("FAIpackage")){
       if($this->FAIstate != "freeze"){
         foreach($_POST['usedPackages'] as $del){
           if(isset($this->usedPackages[$del])){
@@ -261,7 +261,7 @@ class faiPackage extends plugin
     }
 
     /* Configuration dialog open*/
-    if((isset($_POST['Conpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){
+    if((isset($_POST['Conpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages'])) && $this->acl_is_writeable("FAIdebconfInfo")){
       $path = "/etc/gosa/fai/".$this->FAIdebianRelease."/debconf.d";
       $pkg_config = array();
       $pkg = $_POST['usedPackages'][0];
@@ -275,7 +275,7 @@ class faiPackage extends plugin
     }
 
     /* Configuration dialog open*/
-    if($this->FAIstate != "freeze"){
+    if($this->FAIstate != "freeze" && $this->acl_is_writeable("FAIpackage")){
       if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){
         foreach($_POST['usedPackages'] as $pkg){
           if (isset($this->usedPackages[$pkg])){
@@ -365,16 +365,8 @@ class faiPackage extends plugin
    */
   function save_object()
   {
-
     if($this->FAIstate == "freeze") return;  
     plugin::save_object();
-
-
-    foreach($this->attributes as $attrs){
-      if(isset($_POST[$attrs])){
-        $this->$attrs = $_POST[$attrs];
-      }
-    }
   }