mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Move grant cache to class level to ease testing
This commit is contained in:
parent
bdd81ceba0
commit
4a819f70d4
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user