Can't run yii auth module properly

76 views
Skip to first unread message

Allan Zarsuela

unread,
Jul 25, 2013, 1:44:59 AM7/25/13
to yii-...@googlegroups.com

I have also post this in the github but just thinking I can get immediate answer here.I downloaded the extension; rename it to auth;put it in the module and copied the configuration.

I have already set-up the auth tables. But it still doesn't work. I can't access the auth UI in http://localhost/project/index.php/auth I can't get any error.

I also tried the http://localhost/project/index.php/auth/operation/index and http://localhost/project/index.php/auth/assignment/index.

In the AuthAssignment table I have set the user as the role admin.

This is my configuration in main.php:
/*For modules*/
'modules' => array(
'auth'=> array(
'strictMode' => true, // when enabled authorization items cannot be assigned children of the same type.
'userClass' => 'User', // the name of the user model class.
'userIdColumn' => 'id', // the name of the user id column.
'userNameColumn' => 'username', // the name of the user name column.
// 'appLayout' => 'application.views.layouts.main', // the layout used by the module.
'defaultLayout' => 'application.views.layouts.main', // the layout used by the module.
'viewDir' => null, // the path to view files to use with this module.
),
//..

 // application components

'components' => array(
//..
'authManager' => array(
'class'=>'CDbAuthManager',
'connectionID'=>'db',
// /* Renaming tables*/
'assignmentTable' => 'AuthAssignment',
'itemTable' => 'AuthItem',
'itemChildTable' => 'AuthItemChild',
//'defaultRoles'=>array('dataConsumer'),
'showErrors'=>true,
'behaviors' => array(
'auth' => array(
'class' => 'auth.components.AuthBehavior',

),
),
),
'user' => array(
'class' => 'auth.components.AuthWebUser',
// 'admins' => array('admin', 'foo', 'bar'), // users with full access
'admins' => array('admin')
),
//.. 
Can you shed some light on here? Thanks!

Reply all
Reply to author
Forward
0 new messages