hi, Spyros:
I have some problem when use srbac:
-
download the code from svn http://srbac.googlecode.com/svn/trunk/
-
copy the srbac to myapp/protected/modules
-
config the config/main.php
[indent]
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.srbac.controllers.SBaseController',
),
'modules'=>array(
'srbac' => array(
'userclass'=>'User',
'userid'=>'id',
'username'=>'name',
'debug'=>true,
'pageSize'=>10,
'superUser' =>'Authority',
'css'=>'srbac_red.css',
'layout'=>'application.views.layouts.admin',
'notAuthorizedView'=>'application.views.site.unauthorized',
'alwaysAllowed'=>array('SiteLogin','SiteLogout','SiteIndex','SiteAdmin','SiteError', 'SiteContact'),
'userActions'=>array('Show','View','List'),
'listBoxNumberOfLines' => 15,
'imagesPath' => 15,
'imagesPack'=>'noia',
'iconText'=>true,
'header'=>'application.views.header',
'footer'=>'application.views.footer',
'showHeader'=>true,
'showFooter'=>true,
)
),
// application components
'components'=>array(
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to set up database
/*
'db'=>array(
'connectionString'=>'Your DSN',
),
*/
'db'=>array(
'connectionString'=>'mysql:host=127.0.0.1;dbname=myapp', 'username'=>'myapp', 'password'=>'myapp'
),
///////////////////////////////////////////////////////////////////////////////////////
// SRBAC
///////////////////////////////////////////////////////////////////////////////////////
'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',
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),
);
[/indent]
-
visit the url : http://127.0.0.1/index.php?r=srbac/authitem/install
-
show me the message :
....
There is an error in your configuration
Create demo authItems?
and the [install] button is gray.
how can i do with these problem?
detail :
see the attachments image.