[EXTENSION] srbac : Web interface for the administration of rbac

OK, fixed the config error, but can’t get it to work, 404 error

Unable to resolve the request "srbac".

This is my config and Install Page:

Attachment 475 not found.

Attachment 476 not found.

I don’t know what i get error???Click here to view

Help Me!!!

Thanks alot!!!

Check the guides in downloads page

http://code.google.com/p/srbac/downloads/list

I set up srbac successfully. I create db items, itemchildren, assignments following \yii\framework\web\auth\schema.sql. Before, I thought that it’s installed automatically!!!

I’m unsatisfied. Show me how to install srbac automatically if i haven’t already above tables???

Which is the url that you are accessing srbac?

Is it index.php?r=srbac ?

Do you use any urlManager?

The install page installs the tables.

Could you post here the srbac part of your config file?

This is my config:

482

config_components.jpg

483

config_modules.gif

I create User model and CRUD (using yiic shell)

Yii version: 1.1.0

Srbac version: 1.1.0

But I get error:

484

error.gif

I try comment ‘layout’=>’…’

In Install Srbac Page, there is error message: ‘There is an error in your configuration’ and Install Button is disabled. Why????????????????

If I create three tables: items, itemchildren, assignments (using schema.sql in auth component) then It redirects the Srbac Administrator page.

I don’t know what wrong???

“Undefined variable: sort” ??????????????

I follow step by step instructions of your guide. But I can’t do it!!!

Please,show me! Thanks alot!

There’s something wrong with the layout

set it to

"layout"=>"application.views.layouts.main",

Thanks

The error was caused by my modules layout attribute that conflicts with the CWebModule’s layout attribute. I deleted my layout attribute and use the CWebModule’s one in SVN

Great!!! Thanks for your help, Spyros!!!

Your tool is really neccessary for web developer using Yii framework.

The next version SRBAC, do you fix the error???

yes, it’s already fixed in svn and I updated the download page with the new version 1.1.0.1

@spyros,

I already read the documentation. It assumes I know something.

What is step 1?

I added a user class and a simple table,

Can someone post a working config example, I have no idea if I am putting the stuff in the right area.

When I goto http://yourdailyassistant.com/index.php/srbac

I get Unable to resolve the request "srbac".

I am not sure what else I need, is there something wrong with my paths somewhere?

It obviously can’t find the srbac package

Thanks

@spyros,

[extract]Which is the url that you are accessing srbac? Is it index.php?r=srbac ? Do you use any urlManager? [/extract]

I didn’t see your response sorry.

I have used both and even started a new app from scratch.

I still get can’t find route to srbac no matter which I use, with or without urlmanager

Thanks

Have you put srbac in modules directory and srbac configuration array in modules array of your main.php configuration?

is index.php?r=srbac/authItem/install

working?

srbac work good until MySql connection is named ‘db’.

I’m replace ‘db’ with ‘auth’

            'auth'=>array(


                    'class'=>'CDbConnection',


                    'connectionString' => 'mysql:host=localhost;dbname=auth',


                    'emulatePrepare' => true,


                    'username' => 'root',


                    'password' => '1111111',


                    'charset' => 'utf8',


            ),


            'authManager'=>array(


                    'class'=>'CDbAuthManager',


                    'connectionID'=>'auth',


                    'itemTable'=>'items',


                    'assignmentTable'=>'assignments',


                    'itemChildTable'=>'itemchildren',


            ),

and have error: ‘CDbConnection.connectionString cannot be empty’.

Need help :frowning:

hey, Spyros!

I’m trying to use the User class inside a module, but I have no idea on how to tell srbac to use the class

For example:

modules

srbac

profile

poll

core

|__models


       |__User   <= class inside my "core" module

could you please help me with this setting?

thanks in advance!!!

:>)

hey,

I’ve put the following in the import section of my main config file:

‘application.modules.Core.models.*’

and

‘userclass’=>‘MyUserClass’

now I’m able to see the install page, however, I’m not able to click on the “install” button.

srbac says:

There is an error in your configuration

but doesn’t tell me what is the error (all bullets are green)

my config is:

‘srbac’ => array(

    'userclass'=>'KUser', //optional defaults to User


    'userid'=>'id', //optional defaults to userid


    'username'=>'userName', //optional defaults to username


    'debug'=>true, //optional defaults to false


    //'pageSize'=>10, //optional defaults to 15


    //'superUser' =>'Authorizer', //optional defaults to Authorizer


    //'css'=>'srbac.css', //optional defaults to srbac.css


    //'layout'=>'application.views.layouts.admin', //optional defaults to empty string


    //'notAuthorizedView'=>'srbac.views.authitem.unauthorized ', 


    //'alwaysAllowed'=>array('SiteLogin','SiteLogout','SiteIndex','SiteError', 'SiteContact'),


    //'userActions'=>array('Show','View','List'),


    //'listBoxNumberOfLines' => 15, //optional defaults to 10


    //'imagesPath' => 'srbac.images', //optional defaults to srbac.images


    //'imagesPack'=>'noia', //optional defaults to noia


    //'iconText'=>true, //optional defaults to false


    //'header'=>'srbac.views.authitem.header', //optional defaults to srbac.views.authitem.header, must be an existing alias


    //'footer'=>'srbac.views.authItem.footer', //optional defaults to srbac.views.authitem.footer, must be an existing alias


    //'showHeader'=>true, //optional defaults to false


    //'showFooter'=>true, //optional defaults to false


    //'alwaysAllowedPath'=>'srbac.components', //optional defaults to srbac.components must be an existing alias


)

please, what I’m doing wrong?

forget about that

if its useful to somebody, I only get it working by setting:

    'layout'=>'application.views.layouts.main', //optional defaults to empty string

documentation shows “admin”, but doesn’t work

    'layout'=>'application.views.layouts.admin', //optional defaults to empty string

my config now is:

'srbac' => array(


    'userclass'=>'KUser', //optional defaults to User


    'userid'=>'id', //optional defaults to userid


    'username'=>'userName', //optional defaults to username


    'debug'=>true, //optional defaults to false


    'pageSize'=>10, //optional defaults to 15


    //'superUser' =>'Authorizer', //optional defaults to Authorizer


    'css'=>'srbac.css', //optional defaults to srbac.css


    'layout'=>'application.views.layouts.main', //optional defaults to empty string


    //'notAuthorizedView'=>'srbac.views.authitem.unauthorized ', // optional defaults to srbac.views.authitem.unauthorized, 


    //'alwaysAllowed'=>array('SiteLogin','SiteLogout','SiteIndex','SiteError', 'SiteContact'),


    'userActions'=>array('Show','View','List'),


    'listBoxNumberOfLines' => 15, //optional defaults to 10


    //'imagesPath' => 'srbac.images', //optional defaults to srbac.images


    'imagesPack'=>'noia', //optional defaults to noia


    'iconText'=>true, //optional defaults to false


    //'header'=>'srbac.views.authitem.header', //optional defaults to srbac.views.authitem.header, must be an existing alias


    //'footer'=>'srbac.views.authItem.footer', //optional defaults to srbac.views.authitem.footer, must be an existing alias


    //'showHeader'=>true, //optional defaults to false


    //'showFooter'=>true, //optional defaults to false


    //'alwaysAllowedPath'=>'srbac.components', //optional defaults to srbac.components must be an existing alias


)

sorry for disturbing the topic with so many replies…now it works perfectly!!

regards!

:)

Yes, the layout bug is already fixed in SVN.

Are you sure that this is caused by srbac?

Srbac uses the authManager connection.

I think Yii assumes that your db connection is always db and if you change the name you have to overide the getDbConnection() of your models to return your custom connection