Hi there,
I’m getting a little confused with the accessRules function. For example in the following:
public function accessRules()
{
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('index','view'),
'users'=>array('*'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','delete'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin'),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
How does it know which users are ‘admin’ users?
I’ve also set up an RBAC system. Is this separate to the accessRules function or do they need to be linked somehow? If I have an RBAC system do I need accessRules() at all?
Any help will be greatly appreciated!
Thanks