Code

Updated move and create checks
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 10:54:49 +0000 (10:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 10:54:49 +0000 (10:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11085 594d385d-05f5-0310-b6e9-bd551577e9d8

17 files changed:
gosa-core/plugins/admin/acl/class_aclRole.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/personal/generic/class_user.inc
gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/class_servGeneric.inc

index 809d057c5ba87b29860ddd33153c9511c53384ba..2f90c41900d5a5467948e1659901ff33d8cb1757 100644 (file)
@@ -725,7 +725,7 @@ class aclrole extends acl
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 8f55619e44857c6a86959bcd86a7a736292b472b..7b3736f7ede389e27a2b9a0d1478a2a42c2b81a9 100644 (file)
@@ -267,7 +267,7 @@ class department extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index bdfd1f08b2ee70fcb9f14b164bb8544bd5e22733..4c3d27c4d240eaf45d694445f0adc2b22069e8be 100644 (file)
@@ -876,7 +876,7 @@ class ogroup extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 38172f4ffed62bd0729c50e4d46dddfcfb6ceffc..5dc60566dea6508c8ca0578d080b42536355d25e 100644 (file)
@@ -1162,9 +1162,10 @@ class user extends plugin
 
     /* Check if we are allowed to create/move this user 
      */
+    
     if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
       $message[]= msgPool::permCreate();
-    }elseif($this->new_dn != $this->orig_dn && !$this->acl_is_moveable($this->base)){
+    }elseif($this->orig_dn != "new" && $this->new_dn != $this->orig_dn && !$this->acl_is_moveable($this->base)){
       $message[]= msgPool::permMove();
     }
 
index 636a7fb52b0523cc8f65a689d139c6d735edde17..c7c95e575fbf337c36a38a9a0d673d66bcb64526 100644 (file)
@@ -231,7 +231,7 @@ class blocklistGeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
   
index 1fd72753b9ec3df2e227b6c4a9566e6564132951..2bf6b104927deb7ef8132aaa36dac4a80906e325 100644 (file)
@@ -369,7 +369,7 @@ class phoneGeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index c35e837818cadaff1082420caefbe3b2d17ff684..4decf38ceaff8c844aa8ac73667f4fed13fc3c13 100644 (file)
@@ -415,7 +415,7 @@ class conference extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 0adb1c486dc1d99a7c2276fad923dfa565fcadaf..640665faf7fb983a6fbf523228bd8d02196223bf 100644 (file)
@@ -445,7 +445,7 @@ class macro extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 09c530577c95634d54eec9fffd46df6a2548207c..820c9cea070004e6ba4dd85cae8e39ce7e1a2e0e 100644 (file)
@@ -457,7 +457,7 @@ class application extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index dbef1efb1e4549259a5e4a8ff7e5bfa9524f45de..07a497e1baae5f846f377955cee4ef7276a6ed59 100644 (file)
@@ -117,7 +117,7 @@ class deviceGeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 55cc1c7845859e421e046148fd80e912121e0375..f5cb4d0aad5278ecfc7f5b429c34332211d3dd6a 100644 (file)
@@ -551,7 +551,7 @@ class mimetype extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 68cc78273a1351486ef4d6cfeb4b3c05c38b64d8..3c0a3053d0becfa3308ef39b531d3264a5087170 100644 (file)
@@ -703,7 +703,7 @@ class printgeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index fd8a0e78db2130dd8c20f44188cea21ce02b9cd1..1434ff4767f536ed3ced557eaedb49f284852abb 100644 (file)
@@ -445,7 +445,7 @@ class termgeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 0da304eb731c7556b91904a0822edeae804d6028..681c33273eb6751dc4995773a0a9975159a5561c 100644 (file)
@@ -493,7 +493,7 @@ class workgeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
  
index b95909b27be1522beed84162327469de9fb22bb3..edfbf3fc402942d073e31b0f8abd7d2d2c2a46f9 100644 (file)
@@ -231,7 +231,7 @@ class wingeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 44de99f2f3b409ce47fd1607f4b119c22c526d6f..002b38b2eb4c3fe12d580b6c3e15e2b56c079d73 100644 (file)
@@ -244,7 +244,7 @@ class componentGeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }
 
index 29afb9558b737c5fa094568b27f2e43bf05d347a..2886b19b1a244e2a3293d41ef39370f6de489561 100644 (file)
@@ -342,7 +342,7 @@ class servgeneric extends plugin
      */
     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)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }