Code

Udpated acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 10:12:24 +0000 (10:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 10:12:24 +0000 (10:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11083 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc

index b240e542b8c9618bba5e07d8c872c8ec8e893a1c..636a7fb52b0523cc8f65a689d139c6d735edde17 100644 (file)
@@ -20,6 +20,10 @@ class blocklistGeneric extends plugin
   var $attributes = array("cn","description");
 
   var $ignore_account = TRUE;
+
+   var $orig_base = "";
+   var $orig_dn = "";
+
   
   function __construct($config,$dn = "new")
   {
@@ -63,6 +67,9 @@ class blocklistGeneric extends plugin
     } else {
       $this->base =preg_replace ("/^[^,]+,[^,]+,[^,]+,/","",$this->dn);
     }
+    
+    $this->orig_base = $this->base;
+    $this->orig_dn   = $this->dn;
   }
 
   public function execute()
@@ -219,6 +226,15 @@ class blocklistGeneric 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;
   }