SRBAC with isAjaxRequest

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)


echo CHtml::link( ‘Add Copy’, array( ‘accession/create’, ‘biblioid’=>$model->id ),


				'class' =&gt; 'update-dialog-create'



Controller:(action: create)

public function actionCreate($biblioid)


if( Yii::app()->request->isAjaxRequest )


			// Stop jQuery from re-initialization

			Yii::app()-&gt;clientScript-&gt;scriptMap['jquery.js'] = false;


			echo CJSON::encode( array(

			  'status' =&gt; 'failure',

			  //'div'=&gt;&#036;this-&gt;renderPartial('_form', array('model'=&gt;&#036;model), true)));

			  'content' =&gt; &#036;this-&gt;renderPartial( '_form', array('model' =&gt; &#036;model ), true, true )));





			&#036;this-&gt;render( 'create', array( 'model' =&gt; &#036;model ) );