From 95831847c3c69e7556e0e5740f378eb70a76205e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 28 May 2008 09:43:35 +0000 Subject: [PATCH] Added move create acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11072 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/devices/class_deviceGeneric.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc index 099788aad..dbef1efb1 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc @@ -5,6 +5,8 @@ class deviceGeneric extends plugin public $dn = ""; public $cn = ""; public $orig_cn = ""; + public $orig_base = ""; + public $orig_dn = ""; public $description = ""; public $vendor = ""; public $dev_id = ""; @@ -56,6 +58,8 @@ class deviceGeneric extends plugin } else { $this->base =preg_replace ("/^[^,]+,".get_ou('deviceou')."/","",$this->dn); } + $this->orig_base = $this->base; + $this->orig_dn = $this->dn; } @@ -109,6 +113,14 @@ class deviceGeneric 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->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } + return($message); } -- 2.30.2