summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57d3f5e)
raw | patch | inline | side by side (parent: 57d3f5e)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Sep 2007 07:31:31 +0000 (07:31 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Sep 2007 07:31:31 +0000 (07:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7344 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_userinfo.inc | patch | blob | history |
index f2aa91d85dd4d1d0800962910d337dd14150e30f..749d905f5b52a5f3ff409007539b08d64a2a4c8a 100644 (file)
$this->dn= $userdn;
$this->uid= $attrs['uid'][0];
$this->ip= $_SERVER['REMOTE_ADDR'];
+
+ /* Initialize ACL_CACHE */
+ $_SESSION['ACL_CACHE']= array();
}
function get_permissions($dn, $object, $attribute= "", $skip_write= FALSE)
{
+ /* Push cache answer? */
+ if (isset($_SESSION['ACL_CACHE']["$dn+$object+$attribute"])){
+ return ($_SESSION['ACL_CACHE']["$dn+$object+$attribute"]);
+ }
+
$acl= array("r" => "", "w" => "", "c" => "", "d" => "", "m" => "", "a" => "");
/* Build dn array */
$ret= preg_replace('/w/', '', $ret);
}
+ $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]= $ret;
return ($ret);
}