diff options
| author | Simon | 2011-04-07 15:54:55 +0200 |
|---|---|---|
| committer | Simon | 2011-04-07 15:54:55 +0200 |
| commit | 913c2de3f5f1415ceffb24c9955a4891bd474c2e (patch) | |
| tree | 7bc0d1ef3c947f8d598a47f3fad4cba10fdd2b96 /library | |
| parent | ACL beschleunigt, nur 2 SQL Abfragen, keine Schleife und Cache implementiert (diff) | |
| download | pbs2-913c2de3f5f1415ceffb24c9955a4891bd474c2e.tar.gz pbs2-913c2de3f5f1415ceffb24c9955a4891bd474c2e.tar.xz pbs2-913c2de3f5f1415ceffb24c9955a4891bd474c2e.zip | |
ACL-Cache geht bei statischen klassen nicht - ups
Diffstat (limited to 'library')
| -rw-r--r-- | library/Pbs/Acl.php | 6 |
1 files changed, 1 insertions, 5 deletions
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; } |
