Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created January 25, 2014 15:56
Show Gist options
  • Save xcommerce-gists/8618468 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/8618468 to your computer and use it in GitHub Desktop.
Sample Magento administrative helper class
<?php
/**
* News Admin helper
*
* @author Magento
*/
class Magentostudy_News_Helper_Admin extends Mage_Core_Helper_Abstract
{
/**
* Check permission for passed action
*
* @param string $action
* @return bool
*/
public function isActionAllowed($action)
{
return Mage::getSingleton('admin/session')->isAllowed('news/manage/' . $action);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment