From: hickert Date: Wed, 28 May 2008 09:34:30 +0000 (+0000) Subject: Updated acl checks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d9c057494c6e84037629bf28d911c617484d47f;p=gosa.git Updated acl checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11067 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc index 19d5cb933..b95909b27 100644 --- a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc +++ b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc @@ -30,6 +30,10 @@ class wingeneric extends plugin var $sambaPwdLastSet=""; var $sambaAcctFlags=""; var $netConfigDNS; + + var $orig_cn; + var $orig_base; + /* attribute list for save action */ var $ignore_account= TRUE; var $attributes = array("cn", "description","shadowLastChange", @@ -54,10 +58,12 @@ class wingeneric extends plugin $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_winstations_ou())."/", "", $this->dn); } + $this->cn= preg_replace("/\\\$\$/","",$this->cn); + /* Save dn for later references */ $this->orig_dn= $this->dn; - - $this->cn= preg_replace("/\\\$\$/","",$this->cn); + $this->orig_base= $this->base; + $this->orig_cn= $this->cn; } @@ -221,6 +227,14 @@ class wingeneric 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); }