assign a role


I don’t understand how to assign a role…

I want to use for now in learning porpuses the simple

	public function filters()


        return array(





	public function accessRules()


        return array(


                'actions'=>array('create', 'edit'),




But I can’t find how to assign to the user a role… I want it to be based on what in the databes…

don’t need to much for now, just guest user admin roles

or I forced to use CWebUser ?

Everything can be found in Documentation:

Pedro84 Sorry, but I read this documentation twice, and I don’t understand the difference between the simple aproach and RBAC

how to assign admin role withought CWebUser, from UserInetity?

is there something like $identity->level or ->role to assign?

Just don’t get it

or in the simple aproach you can use logged in and not logged in, and cant use roles like "admin" etc. ?


check this out

hope it helps you get started