╃巡洋艦㊣ 2011-03-01 11:02:19 17650次浏览 22条回复 1 1 0

第一步 下载Srbac, 下载地址 第二步 解压至protected/modules/srbac 第三步 配置config/main.php,如下:

'import'=>array(
    'application.models.*',
    'application.components.*',
    'application.extensions.*',
    'application.modules.srbac.controllers.SBaseController',
),
'components'=>array(
    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),
    'authManager'=>array(
        'class'=>'CDbAuthManager',
        'connectionID'=>'db',
        'itemTable'=>'items',
        'assignmentTable'=>'assignments',
        'itemChildTable'=>'itemchildren',
    ),
    'db'=>array(
        'connectionString' => 'mysql:host=localhost;dbname=cms',
        'emulatePrepare' => true,
        'username' => 'root',
        'password' => '123456',
        'charset' => 'utf8',
    ),
),
 'modules'=>array(
        'srbac' => array(
        'userclass'=>'User',
        'userid'=>'id',
        'username'=>'username',
        'debug'=>true,
        'pageSize'=>10,
        'superUser' =>'Authority',
        'css'=>'srbac.css',
        'layout'=>'application.views.layouts.main',
        'notAuthorizedView'=>'srbac.views.authitem.unauthorized',
        'alwaysAllowed'=>array('SiteLogin','SiteLogout','SiteIndex','SiteAdmin','SiteError', 'SiteContact'),
        'userActions'=>array('Show','View','List'),
        'listBoxNumberOfLines' => 15,
        'imagesPath' => 'srbac.images',
        'imagesPack'=>'noia',
        'iconText'=>true,
        'header'=>'srbac.views.authitem.header',
        'footer'=>'srbac.views.authitem.footer',
        'showHeader'=>true,
        'showFooter'=>true,
        'alwaysAllowedPath'=>'srbac.components',
    ),
),

第四步 打开浏览器,输入/path/to/application/index.php?r=srbac进行安装.

觉得很赞
您需要登录后才可以回复。登录 | 立即注册