Performs the pre-action filtering.
{
$allow = true;
$user = Yii::app()->getUser();
$controller = $filterChain->controller;
$action = $filterChain->action;
if( $this->_allowedActions!=='*' && in_array($action->id, $this->_allowedActions)===false )
{
$authItem = '';
if( ($module = $controller->getModule())!==null )
$authItem .= ucfirst($module->id).'.';
$authItem .= ucfirst($controller->id);
if( $user->checkAccess($authItem.'.*')!==true )
{
$authItem .= '.'.ucfirst($action->id);
if( $user->checkAccess($authItem)!==true )
$allow = false;
}
}
if( $allow===false )
{
$controller->accessDenied();
return false;
}
return true;
}