From: cajus Date: Sat, 3 Dec 2005 16:41:48 +0000 (+0000) Subject: Fixed ACL problem X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c2da19ae87e466de15972c69894abd3b1edbf079;p=gosa.git Fixed ACL problem git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2219 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index 9ac2e630c..85bea11d6 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -698,12 +698,11 @@ function get_module_permission($acl_array, $module, $dn) all allowed submodules specified in the ACL */ $tmp= split(",", $acl); foreach ($tmp as $mod){ - if (preg_match("/$module#/", $mod)){ +echo "Compare $module# with $mod
"; + if (preg_match("/^$module#/", $mod)){ $final= strstr($mod, "#")."#"; - - // HICKERT - // old source : continue; - return($final); +echo "Hit while comparing $mod --- $module
"; + continue; } if (preg_match("/[^#]$module$/", $mod)){ return ("#all#"); diff --git a/plugins/admin/groups/class_groupAcl.inc b/plugins/admin/groups/class_groupAcl.inc index 279d93753..706edc95a 100644 --- a/plugins/admin/groups/class_groupAcl.inc +++ b/plugins/admin/groups/class_groupAcl.inc @@ -112,7 +112,7 @@ class acl extends plugin if ($this->object == "all"){ $this->current_acl= preg_replace ( "/[,]?all[,]?/", "", $this->current_acl); } - $this->current_acl= preg_replace ( "/[,]?$this->object#[^,]*[,]?/", "", $this->current_acl); + $this->current_acl= preg_replace ( "/[^a-z0-9A-Z]$this->object#[^,]*[,]?/", "", $this->current_acl); /* assemble new attributes */ $attrs= "";