Hi all,
I'm new in Yii. I have one confusion that is i authenticate user from my database using their email and password and i know that user roles in db(admin, normal user, super admin). I want to know how can i set them Yii admin like we define roles for user. Like if admin login to system he can manage all things. I'm unable to set roles.
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'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
I was unable to set this thing
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>array('admin'),
)
I hope you understand my question if yes please help me.
Best Regards
Ghulam Rasool