Hi guys.
Thanks again for your attention.
The problem is:
I have the accessRules function at Controller component:
return array(
array('allow', // allow all users to perform 'index' and 'contact' actions
'actions'=>array('login'),
'users'=>array('*'),
),
array('allow', // allow authenticated user to perform 'delete' and 'update' actions
'actions'=>array('registroponto','index','logoff','gerapdf'),
'users'=>array('@'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
The actions ‘registroponto’, ‘index’ and ‘logoff’ are located on the same controller PontoController, and the action gerapdf is located in GridPontoController. When the action gerapf is called the following error appears:
CHttpException
You are not authorized to perform this action.
The strange thing is it was working perfectly but out of nowhere stopped working. Nothing has changed and now the action only works if I change it to the same controller where are the other actions (PontoController).
The action gerapdf is called in my cgridview:
...
'url'=>'Yii::app()->createUrl("gridponto/gerapdf", array("id"=>geral::cript($data->codigo_cadfu,\'E\',50),"hra"=>geral::cript($data->hora_registro,\'E\',50)))',
...
What is happening?
Thanks!