From: hickert Date: Mon, 8 Mar 2010 08:07:39 +0000 (+0000) Subject: Fixed acl handling in lists.n -Acls were not checked correctl. If we had permissions... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2cd9b887d9ac72477cca7c5ceec4c91389445678;p=gosa.git Fixed acl handling in lists.n -Acls were not checked correctl. If we had permissions to view only phones, we got all systems listed, due to the fact that get_psermission can not differentiate between object types. We have to do this manually, not just iterate through all possible combinations of acl-categrory M /root/2.6/gosa-all/gosa/plugins/admin/acl/class_filterACL.inc dn and check if there is a -r- in the result. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@16327 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/acl/class_filterACL.inc b/gosa-core/plugins/admin/acl/class_filterACL.inc index 563be9162..2b6f0b782 100644 --- a/gosa-core/plugins/admin/acl/class_filterACL.inc +++ b/gosa-core/plugins/admin/acl/class_filterACL.inc @@ -2,17 +2,17 @@ class filterACL { - static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "") + static function query($parent, $base, $scope, $filter, $attributes, $category, $objectStorage= "") { $config= session::global_get('config'); $ldap= $config->get_ldap_link(TRUE); $flag= ($scope == "sub")?GL_SUBSEARCH:0; $result=array(); - $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "cat")); + $result= array_merge($result,filterACL::get_list($parent, $base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "cat")); if($scope == "sub"){ - $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "search")); + $result= array_merge($result,filterACL::get_list($parent, $base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "search")); } - $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT, "")); + $result= array_merge($result,filterACL::get_list($parent, $base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT, "")); return(filterACL::unifyResult($result)); } @@ -27,7 +27,7 @@ class filterACL { return(array_values($res)); } - static function get_list($base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH, $method= "") + static function get_list($parent, $base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH, $method= "") { $ui= session::global_get('ui'); $config= session::global_get('config');