php class Zend_View_Helper_Che ckAcl extends Zend_View_Helper_Abs trac

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?php
class Zend_View_Helper_CheckAcl extends Zend_View_Helper_Abstract
{
public function checkAcl($resource, $right)
{
$acl = Zend_Registry::get('acl');
$role = $this->view->getRole();
if (!$acl->has($resource)) {
return true;
}
return $acl->isAllowed($role, $resource, $right);
}
}