Code

Fixed menu creation.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Feb 2008 07:26:47 +0000 (07:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Feb 2008 07:26:47 +0000 (07:26 +0000)
-Plugin acls wasn't checked correctly. Now we also see the systems management plugin if we only have terminal acls set.

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

gosa-core/include/class_pluglist.inc

index 87dcd769368812892d2e5496fbea44c3817a496a..8f24af3399412b74debcef9f1c6a407b605cd248 100644 (file)
@@ -79,26 +79,21 @@ class pluglist {
 
        function check_access($aclname)
        {
-               $deps= $this->ui->get_module_departments($aclname);
-
                $acls_to_check = array();
                if(preg_match("/,/",$aclname)){
                        $acls_to_check = split(",",$aclname);
                }else{
                        $acls_to_check = array($aclname);
                }
-       
-               if(preg_match("/\//",$aclname)){
+
+               foreach($acls_to_check as $acl_to_check){
+                       $deps = $this->ui->get_module_departments($acl_to_check);
                        foreach($deps as $dep){
-                               foreach($acls_to_check as $acl_to_check){
+                               if(preg_match("/\//",$acl_to_check)){
                                        if($this->ui->get_permissions($dep,$acl_to_check) != ""){
                                                return(TRUE);
                                        }
-                               }
-                       }
-               }else{
-                       foreach($deps as $dep){
-                               foreach($acls_to_check as $acl_to_check){
+                               }else{
                                        if($this->ui->get_category_permissions($dep,$acl_to_check) != ""){
                                                return(TRUE);
                                        }