From: hickert Date: Wed, 28 May 2008 10:54:49 +0000 (+0000) Subject: Updated move and create checks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95b8b61a8ee4471e16480456d54b98de7d5badf6;p=gosa.git Updated move and create checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11085 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc index 809d057c5..2f90c4190 100644 --- a/gosa-core/plugins/admin/acl/class_aclRole.inc +++ b/gosa-core/plugins/admin/acl/class_aclRole.inc @@ -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(); } diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index 8f55619e4..7b3736f7e 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -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(); } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index bdfd1f08b..4c3d27c4d 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -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(); } diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 38172f4ff..5dc60566d 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -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(); } diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc index 636a7fb52..c7c95e575 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc @@ -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(); } diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc index 1fd72753b..2bf6b1049 100644 --- a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc +++ b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc @@ -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(); } diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc index c35e83781..4decf38ce 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc @@ -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(); } diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 0adb1c486..640665faf 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index 09c530577..820c9cea0 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc index dbef1efb1..07a497e1b 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc index 55cc1c784..f5cb4d0aa 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index 68cc78273..3c0a3053d 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index fd8a0e78d..1434ff476 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -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(); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 0da304eb7..681c33273 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -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(); } diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc index b95909b27..edfbf3fc4 100644 --- a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc +++ b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc @@ -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(); } diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc index 44de99f2f..002b38b2e 100644 --- a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc @@ -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(); } diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 29afb9558..2886b19b1 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -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(); }