summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorSimon2011-04-07 15:54:55 +0200
committerSimon2011-04-07 15:54:55 +0200
commit913c2de3f5f1415ceffb24c9955a4891bd474c2e (patch)
tree7bc0d1ef3c947f8d598a47f3fad4cba10fdd2b96 /library
parentACL beschleunigt, nur 2 SQL Abfragen, keine Schleife und Cache implementiert (diff)
downloadpbs2-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.php6
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;
}