From 913c2de3f5f1415ceffb24c9955a4891bd474c2e Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 7 Apr 2011 15:54:55 +0200 Subject: ACL-Cache geht bei statischen klassen nicht - ups --- library/Pbs/Acl.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'library') diff --git a/library/Pbs/Acl.php b/library/Pbs/Acl.php index 798c5e5..4b1c826 100644 --- a/library/Pbs/Acl.php +++ b/library/Pbs/Acl.php @@ -2,12 +2,10 @@ class Pbs_Acl { - protected $cache; + public static function checkRight($rightShortcut) { $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); $roleID = $userIDsNamespace['roleID']; - if(isset($this->cache[$roleID][$rightShortcut])) - return $this->cache[$roleID][$rightShortcut]; $rightMapper = new Application_Model_RightMapper(); $element = $rightMapper->findBy(array('shortcut',$rightshortcut)); @@ -17,10 +15,8 @@ class Pbs_Acl $rightRolesMapper = new Application_Model_RightRolesMapper(); $rightroles = $rightRolesMapper->findBy(array('roleID' => $roleID,'rightID',$element->getID())); if(count($rightroles) >=1){ - $this->cache[$roleID][$rightShortcut] = true; return true; } - $this->cache[$roleID][$rightShortcut] = false; return false; } -- cgit v1.2.3-55-g7522