Guys please help me. I use srbac to filter my users by roles. SRBAC works perfectly if I am not using (ajax request) cjuidialog in CRUD but if i use srbac in my crud, I cant display "unauthorized error". It just displays a blank cjuidialog.
My code:
View: (link to display modal pop up to create or add new item)
<?php
echo CHtml::link( ‘Add Copy’, array( ‘accession/create’, ‘biblioid’=>$model->id ),
array(
'class' => 'update-dialog-create'
));
?>
Controller:(action: create)
public function actionCreate($biblioid)
{
…
if( Yii::app()->request->isAjaxRequest )
{
// Stop jQuery from re-initialization
Yii::app()->clientScript->scriptMap['jquery.js'] = false;
echo CJSON::encode( array(
'status' => 'failure',
//'div'=>$this->renderPartial('_form', array('model'=>$model), true)));
'content' => $this->renderPartial( '_form', array('model' => $model ), true, true )));
exit;
}
else
{
$this->render( 'create', array( 'model' => $model ) );
}
}