/** * Check whether tab can be showed * * @return bool */ public function canShowTab() { if (!$this->getCustomer()) { return false; } return $this->getCustomer()->getId() && $this->_authSession->isAllowed('Mage_Tag::tag'); }
/** * Check whether tab can be showed * * @return bool */ public function canShowTab() { return $this->_authSession->isAllowed('Mage_Tag::tag'); }
/** * Check whether section is allowed for current user * * @return bool */ public function isAllowed() { return isset($this->_data['resource']) ? $this->_authorization->isAllowed($this->_data['resource']) : false; }
/** * Check whether item is allowed to the user * * @return bool */ public function isAllowed() { try { return $this->_acl->isAllowed((string) $this->_resource); } catch (Exception $e) { return false; } }
public function testIsAllowedReturnNegativeValue() { $this->_policyMock->expects($this->once())->method('isAllowed')->will($this->returnValue(false)); $this->assertFalse($this->_model->isAllowed('Mage_Module::acl_resource')); }
/** * Check is allow modify system configuration * * @return bool */ protected function _isAllowed() { return $this->_authorization->isAllowed('Mage_Adminhtml::config'); }