Code

Updated acl checks
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_printGeneric.inc
index d2b3af58c071a1491980767fd8185679caab1daa..68cc78273a1351486ef4d6cfeb4b3c05c38b64d8 100644 (file)
@@ -15,6 +15,8 @@ class printgeneric extends plugin
   var $gotoPrinterPPD   = "";
   var $initial_PPD      = "";
   var $orig_dn          = "";
+  var $orig_cn          = "";
+  var $orig_base        = "";
 
   var $UserMember       ="";
   var $UserMembers      =array();
@@ -143,6 +145,8 @@ class printgeneric extends plugin
         }
       }
     }
+    $this->orig_cn    = $this->cn;
+    $this->orig_base  = $this->base;
   }
 
   function set_acl_base($base)
@@ -695,6 +699,14 @@ class printgeneric extends plugin
       }
     }
 
+    /* Check if we are allowed to create or move this object
+     */
+    if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
+      $message[] = msgPool::permCreate();
+    }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+      $message[] = msgPool::permMove();
+    }
+
     return ($message);
   }