Code

Added check for "acl_is_moveable"
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 08:18:36 +0000 (08:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 08:18:36 +0000 (08:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4592 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc

index 6fd8b858dd766a7241bae16a764d379dfb604040..5d4e37da129e058980372e21c0d560230e994f86 100644 (file)
@@ -228,7 +228,8 @@ class group extends plugin
     /* Base select dialog */
     $once = true;
     foreach($_POST as $name => $value){
-      if(preg_match("/^chooseBase/",$name) && $once){
+      if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
+          
         $once = false;
         $this->dialog = new baseSelectDialog($this->config,$this,$bases);
         $this->dialog->setCurrentBase($this->base);
@@ -243,7 +244,9 @@ class group extends plugin
       if($this->dialog->isClosed()){
         $this->dialog = false;
       }elseif($this->dialog->isSelected()){
-        $this->base = $this->dialog->isSelected();
+        if($this->acl_is_moveable()){
+          $this->base = $this->dialog->isSelected();
+        }
         $this->dialog= false;
       }else{
         return($this->dialog->execute());
@@ -270,6 +273,13 @@ class group extends plugin
       $smarty->assign("pickupGroup",false);
     }
 
+    /* Assign base ACL */
+    $baseACL = $this->getacl("base");
+    if(!$this->acl_is_moveable()) {
+      $baseACL = preg_replace("/w/","",$baseACL);
+    }
+    $smarty->assign("baseACL",          $baseACL);
+
     /* Manage object add dialog */
     if ($this->group_dialog){
 
@@ -554,9 +564,13 @@ class group extends plugin
         $this->smbgroup = 0;
       }
 
+      /* Get base selection */
+      if($this->acl_is_moveable() && isset($_POST['base'])){
+        $this->base = $_POST['base'];
+      }
+
       foreach (array(
             "force_gid"  => "gidNumber", 
-            "base"       => "base", 
             "smbgroup"   => "sambaGroupType") as $val => $aclname) {
         if ($this->acl_is_writeable($aclname)  && isset($_POST["$val"])){
           $this->$val= $_POST["$val"];
@@ -901,7 +915,6 @@ class group extends plugin
           "plProvidedAcls"    => array(
             "cn"                => _("Name"),
             "description"       => _("Description"),
-            "base"              => _("Base"),
 
             "fonGroup"         => _("Phone pickup group"),
             "nagiosGroup"      => _("Nagios group"),