diff options
-rw-r--r-- | library/Pbs/Acl.php | 6 | ||||
-rw-r--r-- | public/media/img/checked.png | bin | 0 -> 652 bytes |
2 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; } diff --git a/public/media/img/checked.png b/public/media/img/checked.png Binary files differnew file mode 100644 index 0000000..65aaea6 --- /dev/null +++ b/public/media/img/checked.png |