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

Your extension looks like it’s exactly what I need! You seem to

have done a great job in creating it. I’ve got two questions:

  1. Will the srbac extension run under Yii version 1.1?

  2. Can you explain why my attempt to install srbac by browsing index.php?r=srbac/authItem/install

under Yii version 1.1 (for Windows 2008 IIS) got this error message?..

include_once(D:\WebRoot\blog2\protected\modules\srbac\controllers\AuthItemController.php\…\SBaseController.php): failed to open stream: No such file or directory

Any help you can provide would be appreciated.

I found a bug in "controllers/AuthItemController.php"


include_one (controllers/AuthItemController.php/../SBaseController.php): failed to open stream: No such file or directory

I replaced the line 2 in "controllers/AuthItemController.php" with this new line:


include_once dirname(__FILE__).DIRECTORY_SEPARATOR."SBaseController.php";

Now works gr8.

I’m using PHP 5.3, I think this bug can affect some other PHP versions

Thanks,

I uploaded the fixed version.

Version 1.02.1

Bug fix

Fixed a bug that prevented installation of srbac<br />

Enhancements:

Srbac attribute alwaysAllowed, to define which operations are always allowed

Srbac attribute userActions to define which actions are assigned to ‘using task’ by default

layout attribute accepts path alias now

The automatic creation is very comfortable. Is it possible, that it includes the controller of the modules?

Greetings

Anticon

Do you mean to include controllers of all possible modules you have in your application?

That’s possible, I will add it for the next release

Hello,

Can you please tell me how to configure sbrac step by step? It will really help me to understand bcz i m new to use Yii.

THanks

Neel

Please see http://www.yiiframework.com/extension/srbac/#doc

Updated Spanish messages for SRBAC 1.02_1

326

es.zip

Hello. I trying to use srbac. But, after configuration of authManager and srbac, my browser cannot retrieve url “index.php?r=srbac/authItem/install” with message “Page not found”. What’s the problem?

Where I use this code? let me know.

My directory path:

/protected/config/main.php – this is my main config file

      /components


      /controllers


      /extensions


      /messages


      /models


      /views ----here I put sbrac folder

srbac in modules:

‘srbac’=>

array(

// Your application’s user class (default: User)

"userclass"=>"User",

// Your users’ table user_id column (default: userid)

"userid"=>"user_ID",

// 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"=>10,

// 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.admin",

//The not authorized page

"notAuthorizedView"=>"application.views.site.unauthorized",

// The always allowed actions

"alwaysAllowed"=>array(

‘SiteLogin’,‘SiteLogout’,‘SiteIndex’,‘SiteAdmin’,

‘SiteError’, ‘SiteContact’),

// The operationa assigned to users

"userActions"=>array(

"Show","View","List"

),

)

you should put srbac folder in your modules directory.

Hello,

I did but still page not found. I m stack. Plz help me. Or Plz can you write down step by step for me, I m newly use Yii and try to figure out everything.I m really appreciate if you help me.

THanks

Neel

Hello,

It will really help me if you send me a step by step procedure to configure srbac. Just two days I m using Yii and try to understand this.

thanks

Neel

Hello,

Where is the modules directory?

Here is my directory path

/protected/config/main.php – this is my main config file

/protected/components

/protected/controllers

/protected/extensions

/protected/messages

/protected/models

/protected/views

Neel, please read this first:

http://www.yiiframework.com/doc/guide/basics.module

It makes no sense to exlpain all the basics in such a thread.

Best regards,

schmunk

Hi, Spyros

Get some from 1.02.1

  1. Undefined variable: id in ‘authItem\assignments.php’ line 2 (something like getting user ‘id’ is expected in ‘controllers\AuthItemController.php’ line 559).

  2. ‘showAssignments’ ajax call from assignments.php (line 8 ) doesn’t seem to do anything (no partial rendering by ‘actionShowAssignments’). So no assignments loaded after user is chosen.

  3. I believe that ‘front page’ should be rendered not only from ‘/srbac/authItem’, but primarily from ‘/srbac’.

Thanks

I’ll take a look

I’m having the same problems 1) and 2) as posted by <idle sign>. srbac v1_02_1

I uploaded version 1.02.5 with these bugs fixed (i hope)

Please take a look

Thanks

In windows it’s all ok, but in linux:


CException


Description


AuthItemController cannot find the requested view "/authItem/tabViews/roleToUser".


Source File


/var/www/mysite/framework/web/CController.php(715)




#0 /var/www/mysite/framework/web/widgets/CTabView.php(197): CController->renderPartial('/authItem/tabVi...', Array)

#1 /var/www/mysite/framework/web/widgets/CTabView.php(138): CTabView->renderBody()

#2 /var/www/mysite/framework/web/CBaseController.php(154): CTabView->run()

#3 /var/www/mysite/htdocs/protected/modules/srbac/views/authItem/assign.php(22): CBaseController->widget('system.web.widg...', Array)