*/ class Mage_Api2_Block_Adminhtml_Roles extends Mage_Adminhtml_Block_Widget_Grid_Container { /** * Construct grid container */ public function __construct() { parent::__construct(); $this->_blockGroup = 'api2'; $this->_controller = 'adminhtml_roles'; $this->_headerText = Mage::helper('adminhtml')->__('REST Roles'); //check allow edit /** @var $session Mage_Admin_Model_Session */ $session = Mage::getSingleton('admin/session'); if ($session->isAllowed('system/api/roles/add')) { $this->_updateButton('add', 'label', $this->__('Add Admin Role')); } else { $this->_removeButton('add'); } } }