Move grant cache to class level to ease testing

This commit is contained in:
nathangray 2018-09-20 11:05:17 -06:00
parent bdd81ceba0
commit 4a819f70d4

View File

@ -44,6 +44,12 @@ class Acl
*/
const TABLE = 'egw_acl';
/**
* Cache for grants
* @var array
*/
var $cache = array();
/**
* Constants for acl rights, like old EGW_ACL_* defines
*/
@ -662,7 +668,7 @@ class Acl
if (!$app) $app = $GLOBALS['egw_info']['flags']['currentapp'];
if (!$user) $user = $this->account_id;
static $cache = array(); // some caching withing the request
$cache = $this->cache; // some caching within the request
$grants =& $cache[$app][$user];
if (!isset($grants))