Code

Replaced print_red with msg_dialog, for testing
[gosa.git] / include / class_pluglist.inc
index fd6fac1548084fe369ed5db1a36adccd8727d6ce..50e0c0f191a29158c58fd8df71453925b8992bf7 100644 (file)
@@ -79,8 +79,7 @@ class pluglist {
 
        function check_access($aclname)
        {
-               $acl = "";
-               $deps = $this->ui->get_module_departments($aclname);
+               $deps= $this->ui->get_module_departments($aclname);
 
                $acls_to_check = array();
                if(preg_match("/,/",$aclname)){
@@ -92,19 +91,20 @@ class pluglist {
                if(preg_match("/\//",$aclname)){
                        foreach($deps as $dep){
                                foreach($acls_to_check as $acl_to_check){
-                                       $acl.=$this->ui->get_permissions($dep,$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){
-                                       $acl.=$this->ui->get_category_permissions($dep,$acl_to_check);
+                                       if($this->ui->get_category_permissions($dep,$acl_to_check) != ""){
+                                               return(TRUE);
+                                       }
                                }
                        }
                }
-               if($acl != ""){
-                       return (TRUE);
-               }
                return (FALSE);
        }