public function accessRules()
{
return array(
array('allow', // allow all users to perform 'index' actions
'actions'=>array('index'),
'users'=>array('*'),
),
array('allow', // allow authenticated user to 'view' actions
'actions'=>array('view'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' 'delete', 'create','update' actions
'actions'=>array('admin','delete', 'create','update' ),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}the lesson database has lesson->type which can be either a text lesson - 't' or video lesson represented by 'v'
I now want to modify the rule so that if lesson->type == 't', anyone can see it, but if lesson->type == 'v', only logged in users can see it.
How do i achieve this ?
thanks a lot for your reply

Help











