Creating Authorization Roles

Lots of newbies will face the problem with creating roles as i did… This might help all of them.

  1. There are two methods of storing in DB and in File

I cracked storing in DB using console script and will explain the same.

  1. modify your protected/config/console.php as

‘db’=>array(

		'connectionString' => 'mysql:host=localhost;dbname=dbname',


		'emulatePrepare' => true,


		'username' => 'root',


		'password' => '',


		'charset' =

[color="#006400"]/* Moved from "General Discussion for Yii 1.1.x" to "Tips, Snippets and Tutorials" */[/color]