access rules

Hi am using the following code


public function accessRules()

	{

		return array(

			array('allow',  // allow all users to perform 'index' and 'view' actions

				'actions'=>array('index','view'),

				 'users'=>array('ram','ravi'),

			),

			array('allow', // allow authenticated user to perform 'create' and 'update' actions

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

				'users'=>array('ram','ravi'),

			),

			array('allow', // allow admin user to perform 'admin' and 'delete' actions

				'actions'=>array('admin','delete'),

				'users'=>array('ram','ravi'),

			),

			array('deny',  // deny all users

				'users'=>array('*'),

			),

		);

	}



i have user table with  
  1. username values(ravi,ramu)
2.password

am using this table login i have 2 accessing permissions with another table

1.superadmin,

2.admin

  when ever  i need accessing permissions with superadmin,admin,

how to solve this problem…

You can use default yii’s RBAC privilegions schema. It’s more powerful and better. In this case your can use operations, tasks and roles to control an user access.

Do you have any idea about RBAC ,am not getting in correct way