Code

Added create move acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 09:57:50 +0000 (09:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 09:57:50 +0000 (09:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11074 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc

index 8293716776b5c9ee074ec9294403e20917b09a19..c35e837818cadaff1082420caefbe3b2d17ff684 100644 (file)
@@ -66,6 +66,9 @@ class conference extends plugin
 
   var $objectclasses= array("top", "goFonConference");
 
+  var $orig_dn ="";
+  var $orig_base = "";
+
   function conference (&$config, $dn, $plugin= NULL)
   {
     plugin::plugin($config, $dn, $plugin);
@@ -146,6 +149,9 @@ class conference extends plugin
     $this->old_dn = $this->dn;
     $this->old_cn = $this->cn;
     $this->old_base = $this->base;
+    $this->orig_base = $this->base;
+    $this->orig_dn = $this->dn;
+  
   }
 
 
@@ -404,6 +410,15 @@ class conference extends plugin
         $message[] = msgPool::duplicated(_("Name"));
       }
     }
+
+    /* 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;
   }