joomla/joomla-cms — pull request #4198 by berlanda (2014-08-31 03:40:41+00:00)
Title: Allow to get permitions for section != 'component'

This will allow to set ACL different groups based on category permissions, for example:
access.xml

[...]

view.html.php (view of a generic component)
[...]
$this->canDo = JHelperContent::getActions('com_componentname', 'category', $item->catid);
if (!$this->canDo->get('roles.manage')) {
JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$app = JFactory::getApplication();
$app->redirect('index.php');
}
[...]