From d15d58fb3a4b105d266e23424e6a44b2df1504f6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 May 2009 11:58:27 +0000 Subject: [PATCH] Applied commits from 13003. -Added special check when copying applications. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13613 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../applications/class_applicationGeneric.inc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/trunk/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/trunk/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index b6caa4d92..a62c9c576 100644 --- a/trunk/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/trunk/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -17,6 +17,8 @@ class application extends plugin var $last_sorting= "invalid"; var $applications= array(); + var $copy_source_dn =""; + var $orig_base = ""; var $orig_cn = ""; var $orig_dn = ""; @@ -460,12 +462,19 @@ class application 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->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ - $message[] = msgPool::permMove(); + if($this->copy_source_dn != ""){ + if(!$this->acl_is_createable($this->copy_source_dn)){ + $message[] = msgPool::permCreate(); + } + }else{ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } } + return $message; } @@ -586,6 +595,7 @@ class application extends plugin plugin::PrepareForCopyPaste($source); $source_o = new application($this->config,$source['dn']); $this->gosaApplicationIcon = $source_o->gosaApplicationIcon; + $this->copy_source_dn = $source['dn']; } -- 2.30.2