summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e762b3)
raw | patch | inline | side by side (parent: 6e762b3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jul 2008 06:21:34 +0000 (06:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jul 2008 06:21:34 +0000 (06:21 +0000) |
- get_list and get_sub_list will now work with plugin acls (category/name), instead of only category acls (category)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11671 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11671 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index ada218b76e732f49f366660218a5bf33476ac4da..2cf169292471d632d676dd4ee9ef418c91c679a3 100644 (file)
@@ -905,16 +905,14 @@ function get_sub_list($filter, $category,$sub_deps, $base= "", $attributes= arra
}else{
/* Sort in every value that fits the permissions */
- if (is_array($category)){
- foreach ($category as $o){
- if ($ui->get_category_permissions($dn, $o) != ""){
- $result[]= $attrs;
- break;
- }
- }
- } else {
- if ( $ui->get_category_permissions($dn, $category) != ""){
+ if (!is_array($category)){
+ $category = array($category);
+ }
+ foreach ($category as $o){
+ if((preg_match("/\//",$o) && preg_match("/r/",$ui->get_permissions($dn,$o))) ||
+ (!preg_match("/\//",$o) && preg_match("/r/",$ui->get_category_permissions($dn, $o)))){
$result[]= $attrs;
+ break;
}
}
}
@@ -975,19 +973,14 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G
}else{
/* Sort in every value that fits the permissions */
- if (is_array($category)){
- foreach ($category as $o){
- if ($ui->get_category_permissions($dn, $o) != ""){
-
- /* We found what we were looking for, break speeds things up */
- $result[]= $attrs;
- }
- }
- } else {
- if ($ui->get_category_permissions($dn, $category) != ""){
-
- /* We found what we were looking for, break speeds things up */
+ if (!is_array($category)){
+ $category = array($category);
+ }
+ foreach ($category as $o){
+ if((preg_match("/\//",$o) && preg_match("/r/",$ui->get_permissions($dn,$o))) ||
+ (!preg_match("/\//",$o) && preg_match("/r/",$ui->get_category_permissions($dn, $o)))){
$result[]= $attrs;
+ break;
}
}
}