Code

Fixed check_acces in class_pluglist.inc
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Mar 2010 10:58:46 +0000 (10:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Mar 2010 10:58:46 +0000 (10:58 +0000)
-We are now able to use category acls in combination with :self (users:self) to enables us to create acls for myAccount again.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16349 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_pluglist.inc

index 80c9a33d981e530f0c4343e887fb11e4f91c4673..41fbd1d382d23282168cf644aed631965fdd0f8f 100644 (file)
@@ -141,12 +141,17 @@ class pluglist
        */      
       if(preg_match("/:self$/",$acl_to_check)){
         $acl_to_check = preg_replace("/:self$/","",$acl_to_check);     
-        if($this->ui->get_permissions($this->ui->dn,$acl_to_check,"") != ""){
-          $this->silly_cache[$aclname]= TRUE;
-          return(TRUE);
+        if(strpos($acl_to_check,"/")){
+          if($this->ui->get_permissions($this->ui->dn,$acl_to_check,"") != ""){
+            $this->silly_cache[$aclname]= TRUE;
+            return(TRUE);
+          }
+        }else{
+          if($this->ui->get_category_permissions($this->ui->dn,$acl_to_check,"") != ""){
+            $this->silly_cache[$aclname]= TRUE;
+            return(TRUE);
+          }
         }
-        $this->silly_cache[$aclname]= FALSE;
-        return(FALSE);
       }else{
 
         // No self acls. Check if we have any acls for the given ACL type