From 8833b76a20fa058650c31fb31fceb748e4c2fdfb Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 30 Oct 2008 09:00:44 +0000 Subject: [PATCH] Updated class userinfo. - Do not check "ignoreACL" config attribute on each ACL request. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12822 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_userinfo.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index 7ba77834a..a54892f50 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -36,6 +36,7 @@ class userinfo var $ocMapping= array(); var $groups= array(); var $result_cache =array(); + var $ignoreACl = FALSE; /* get acl's an put them into the userinfo object attr subtreeACL (userdn:components, userdn:component1#sub1#sub2,component2,...) */ @@ -67,6 +68,8 @@ class userinfo $this->uid= $attrs['uid'][0]; $this->ip= $_SERVER['REMOTE_ADDR']; + $this->ignoreACL = ($this->config->get_cfg_value("ignoreAcl") == $this->dn); + /* Initialize ACL_CACHE */ session::set('ACL_CACHE',array()); $this->reset_acl_cache(); @@ -350,7 +353,10 @@ class userinfo /* With user filter */ if (isset($subacl['filter']) && !empty($subacl['filter'])){ - if(!$ldap->object_match_filter($dn,$subacl['filter'])){ + $id = $dn."-".$subacl['filter']; + if(!isset($ACL_CACHE[$id])){ + $ACL_CACHE[$id] = $ldap->object_match_filter($dn,$subacl['filter']); + }elseif(!$ACL_CACHE[$id]){ continue; } } @@ -599,7 +605,7 @@ class userinfo */ function ignore_acl_for_current_user() { - return($this->config->get_cfg_value("ignoreAcl") == $this->dn); + return($this->ignoreACL); } } -- 2.30.2