Heya, I have a problem.
I've installed srbac on my second application, seemed to retrace all the steps I did in the first, checked with manual but it doesn't do the user->checkAccess(). My single user is assigned an admin role, under which the srbac should be available. But even that doesn't work once I turn off the debug mode...
I have my controller extended from SBaseController, in the config I have this:
'import'=>array(
'application.models.*',
'application.modules.srbac.controllers.SBaseController',
'application.components.*',
'application.extensions.*',
'application.modules.srbac.components.*',
),
'modules'=>array(
'srbac' => array (
'userclass'=>'Users', //optional defaults to User
'userid'=>'usr_id', //optional defaults to userid
'username'=>'usr_username', //optional defaults to username
'debug'=>false, //optional defaults to false
'pageSize'=> 30, //optional defaults to 15
'superUser' =>'admin', //optional defaults to Authorizer
'css'=>'srbac.css', //optional defaults to srbac.css
'layout'=>'application.views.layouts.main', //optional defaults to
// application.views.layouts.main, must be an existing alias
'alwaysAllowed'=>array( //optional defaults to gui
'SiteLogin','SiteLogout','SiteIndex',
'SiteError', 'SiteContact'
),
'userActions'=>array(//optional defaults to empty array
'Show','View','List'
),
'listBoxNumberOfLines' => 30,
'alwaysAllowedPath'=>'srbac.components', //optional defaults tosrbac.components
// must be an existing alias
),
),
components (
'db'=>array(
'class'=>'system.db.CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=vpn',
'emulatePrepare' => true,
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
'enableProfiling' => true,
),
'authManager'=>array(
// The type of Manager (Database)
'class'=>'CDbAuthManager',
// The database component used
'connectionID'=>'db',
// The itemTable name (default:authitem)
'itemTable'=>'items',
// The assignmentTable name (default:authassignment)
'assignmentTable'=>'assignments',
// The itemChildTable name (default:authitemchild)
'itemChildTable'=>'itemchildren',
'defaultRoles'=>array('guest'),
),
),