public function beforeAction($action) {
if(Yii::app()->user->checkAccess($this->getId().'-'.$action->id))
return true;
throw new CHttpException(403,'You don\'t have permissions to access this page');
// $this->redirect(array('site/error'));
}
And the problem is that I’m getting the exception printed on a white page, there is no layout, or css.
But when i throw the exception in any controller action everything works fine. (the error page is rendered ok
throw new CHttpException(403,'You don\'t have permissions to access this page');
In other words the actionError in the SiteController is not called if in Controller::beforeAction an exception is thrown, is there a work-around for this ?