Code

Fixed ACL problem
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 3 Dec 2005 16:41:48 +0000 (16:41 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 3 Dec 2005 16:41:48 +0000 (16:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2219 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc
plugins/admin/groups/class_groupAcl.inc

index 9ac2e630c5927e1975c04e6f1fd6703dc0e1c9e9..85bea11d6c79a99118f406737ae01e7e4137b111 100644 (file)
@@ -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<br>";
+      if (preg_match("/^$module#/", $mod)){
         $final= strstr($mod, "#")."#";
-
-        // HICKERT 
-        // old source : continue;
-        return($final);
+echo "Hit while comparing $mod --- $module<br>";
+        continue;
       }
       if (preg_match("/[^#]$module$/", $mod)){
         return ("#all#");
index 279d937530b6578ff39cf3e45458288365eb8e50..706edc95a1753f4c951769670c2a54b576a30200 100644 (file)
@@ -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= "";