no ,when i visit http://localhost/srbac/authitem/manage,it will turn to install page.
well,i guess i will happen when it’s a new fresh installation of yii.
1,first create webapp
2,create user table,and use "yiic shell" to "model user,crud user"…
3,unzip srbac to webapp’s module folder.
4,in config/main.php write the things.
5,open the url http://localhost/srbac, and install…
6,it mentions succesfully ,and I open http://localhost/srbac/manage,it will redirect to http://localhost/srbac/install again.
the main.php is:
'modules'=>array(
'srbac'=>
array(
// Your application's user class (default: User)
"userclass"=>"user",
// Your users' table user_id column (default: userid)
"userid"=>"userid",
// your users' table username column (default: username)
"username"=>"username",
// If in debug mode (default: false)
// In debug mode every user (even guest) can admin srbac, also
//if you use internationalization untranslated words/phrases
//will be marked with a red star
"debug"=>true,
// The number of items shown in each page (default:15)
"pageSize"=>16,
// The name of the super user
"superUser" =>"Authority",
//The css file to use
//"css"=>"srbac_red.css", // must be in srbac css folder
//The layout to use
"layout"=>"application.views.layouts.main",
//The not authorized page
"notAuthorizedView"=>"application.views.site.login",
// The always allowed actions
"alwaysAllowed"=>array(
'SiteLogin','SiteLogout','SiteIndex','SiteAdmin',
'SiteError', 'SiteContact','SiteCaptcha'
),
// The operationa assigned to users
"userActions"=>array(
"Show","View","List"
),
// The number of lines of the listboxes
"listBoxNumberOfLines" => 10,
// The path to the custom images relative to basePath (default the srbac images path)
//"imagesPath"=>"../images",
//The icons pack to use (noia, tango)
"imagesPack"=>"tango",
// Whether to show text next to the menu icons (default false)
"iconText"=>true,
)
),
and the auth section is:
[quote]
'authManager'=>array(
// The type of Manager (Database)
'class'=>'CDbAuthManager',
// The database connection used
'connectionID'=>'db',
// The itemTable name (default:authitem)
'itemTable'=>'AuthItem',
// The assignmentTable name (default:authassignment)
'assignmentTable'=>'AuthAssignment',
// The itemChildTable name (default:authitemchild)
'itemChildTable'=>'AuthItemChild',
),
[/quote]
the installation info as following:
Your Database, AuthManager and srbac settings: 1.1
Database
Driver mysql
Connection mysql:host=127.0.0.1;dbname=rbac
AuthManager
Item Table AuthItem
Assignment Table AuthAssignment
Item child table AuthItemChild
srbac
yiiSupportedVersion
1.1.0
version
1.1.0 beta
debug
1
pageSize
16
alwaysAllowed
SiteLogin, SiteLogout, SiteIndex, SiteAdmin, SiteError, SiteContact, SiteCaptcha
userActions
Show, View, List
listBoxNumberOfLines
10
iconText
1
showHeader
showFooter
useAlwaysAllowedGui
userid
userid
username
username
userclass
user
superUser
Authority
css
srbac.css
notAuthorizedView
application.views.site.login
layout
application.views.layouts.main
imagesPath
srbac.images
imagesPack
tango
header
srbac.views.authitem.header
footer
srbac.views.authitem.footer
Yii
Yii version : 1.1b
Create demo authItems?