From: hickert Date: Wed, 28 May 2008 08:50:19 +0000 (+0000) Subject: Added move and create acl checks. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7ae01fa70cfd70c4076c0f962059df73ef13f96c;p=gosa.git Added move and create acl checks. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11061 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 5c00c8155..2318c2997 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -48,6 +48,7 @@ class group extends plugin var $oldgroupType= ""; var $orig_dn= ""; var $orig_cn= ""; + var $orig_base= ""; var $has_mailAccount= FALSE; var $group_dialog= FALSE; var $nagios_group =FALSE; @@ -195,6 +196,7 @@ class group extends plugin /* Get object base */ $this->base =preg_replace ("/^[^,]+,".normalizePreg(get_groups_ou())."/","",$this->dn); } + $this->orig_base = $this->base; /* Is this account a trustAccount? */ if (isset($this->attrs['trustModel'])){ @@ -1115,6 +1117,14 @@ class group extends plugin } } + /* Check if we are allowed to create or move this object + */ + if($this->dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->cn != $this->orig_cn || $this->base != $this->orig_base){ + $message[] = msgPool::permMove(); + } + return ($message); }