RBAC Data Structures


I am configuring RBAC in my YII application and have set the datastore location for RBAC as DB in the main.php config file.

   'authManager'=>array(     'class'=>'CDbAuthManager',     'connectionID'=>'db',   ),

I have not created any tables in the DB for RBAC, do I need to create the tables manually or does the AuthManager create them automatically.

When I try to insert a new role I get the exception in CDbCommand.php:

00224: throw new CDbException(Yii::t(‘yii’,‘CDbCommand failed to execute the SQL statement: {error}’.$this->text,

00225: array(’{error}’=>$e->getMessage())));

I have tried to find the DB setup for RBAC on the internet but with no luck.

Thanks in advance.

there already has one gui extension to deal it : srbac ,you may search it and try it.

Thanks for the reply,

Seems that I had a configuration problem. SRBAC came in very usefull to create the data structures.

Many thanks!

the sql file is located under framework\web\auth