Hi,
I have a CActiveRecord class called Article,and I use CListView fed with a CDataProvider instance to display the articles in a view.
I have a column in Article called access where I store the least powerful role that can read the article.I can’t figure out,when buliding the CdataProvider innstance, how to fetch only the articles whose access column returns true for this test:
Yii::app()->user->checkAccess(model->access);
The above condition should return true for the article but obviously I cannot use it like a condition in CDbCriteria since it is not an SQL condition but uses php code.
I will appreciate your help,thanks in advance.