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

Hi Spyros,

Thanks for making the fixes & improvements I requested.

Yesterday I spent >2 hrs with a colleague, trying to get my (working) code to also work on his system. I’m on Windows, he’s on Linux. There were a lot of changes to make.

Today I downloaded 1_02_07 and diff’d it with the changes I made yesterday. Below are the results. You may want to consider making these changes in SRBAC to make it fully compatible with Linux, which is case-sensitive, and which also seems to have problems resolving path-names relative to the module-base-dir. The following changes all work on Windows as well as Linux:

  • add /authitem/ to render() and renderPartial() calls in AuthItemController.php

  • add /authitem/ to renderPartial() calls in /views/authitem/tabviews/*

  • add /authitem/ to renderPartial() calls in /views/authitem/manage/*

  • add /authitem/ to ‘view’=> definition in /views/authitem/*

  • change case of ‘authitem’ to ‘authItem’ for each ‘url’=> and ‘url:’ in /views/authitem/*

  • change case of ‘authitem’ to ‘authItem’ for ajaxSubmitButton() calls in /views/authitem/tabviews/*

My system: Windows XP SP2, Apache 2.2.11, PHP 5.2.9-1, MySQL 5.0.85

  • Jeremy

Still

:(

Those bugs are already fixed in SVN version. Check the fixed version out.

http://code.google.com/p/srbac/source/checkout

I already test it on Ubuntu Server 9.10, Apache 2.2.12, PHP 5.3, MySQL 5.1, Yii v.1.0.10… and works like a charm.

Ricardo

Cool. Thx! :)

actually, the code in google is NOT fixed.

See:

http://code.google.com/p/srbac/source/browse/trunk/protected/modules/srbac/controllers/AuthItemController.php

/authitem/ is NOT added

http://code.google.com/p/srbac/source/browse/trunk/protected/modules/srbac/views/authitem/tabViews/operationToTask.php

/authitem/ is NOT added

Ricardo - can you clarify please?

2nd thought - maybe this is a php or apache config problem on my colleague’s system. I do not have access to his system now to compare. Anyway the changes I outlined above, which are not yet in google code version, did resolve the problems. Clearly they are not needed by Ricardo on Linux; but maybe they will help others. At least they can find from this forum.

AuthItemController was renamed to AuthitemController, also all references to authItem controller and authItem views were renamed to authitem.

In Linux you can download the last SVN version with this command:

svn checkout http://srbac.googlecode.com/svn/trunk/ srbac

Spyros already tested on Windows and I already tested on Linux. Both got a fully working version.

Check it out, and report any bug.

Ricardo

Hi guys,

it’s pretty cool to see to progress going on with srbac.

I am getting so many notification e-mails every day :lol:

For me it would be pretty cool, if there would be a thread only for important updates and releases.

@Spyros: Is there another thread or RSS feed for updates and releases?

Best regards,

schmunk

I could create another thread for srbac updates/releases but I don’t know if it’s against the board rules.

You may download and check ver 1.02r13 from the extensions page

http://www.yiiframework.com/extension/srbac/

or from google code

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

Bug Fixes:

Fixed php short tags in views/AuthItem/userAssignments.php

srbac should work now in linux os

Enhancements:

listBoxNumberOfLines attributes controls the number of lines in assign tabview listboxes

Updates:

Updated spanish translation (Ricardo Obregon)

A new not official version that needs testing

srbac v1.2.r18

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

Enhancements:

Added srbac attribute imagesPath to set the path to the srbac icons (create, delete, admin etc)

Custom srbac css file can be placed not only in srbac/css directory but also in default application/css directory

Auto create checks if tasks exist and displays them or not in the create tasks list

Auto creating of modules controllers actions

Bug Fixes:

Changed dataGrid class to srbacDataGrid so it won’t conflict with Yii dataGrid class

The part that needs testing is the auto creation of modules controllers actions.

If anyone can test it please inform me about the results.

Thanks

Works fine for me (Linux OS, PHP 5.3, MySQL 5.1, Yii 1.0.11-dev)

Do you have any modules in your application (besides srbac)?

Does srbac works fine with them?

Again have errors when set the debug to false. Otherwise (if debug=>true) , everybody (even guest) can administrate srbac.

What should I do to fix it?

What kind of errors?

Did you completeley deleted the older version of srbac and copy the newest, or just replaced the files?

No no, I’ve completely removed older version. here is stack trace:

I think I know what’s the problem

You haven’t set a “not authorized view” and when a user tries to access a page which is not authorized to the controllers tries to render a null view.

I will add a check for the “not authorized view” and won’t display it if there’s not one , or add a default one.

Meanwhile you can comment the rows in SBaseController that render the views (there are two renders around lines 42-45)

Thanks

The issue is fixed.

Please check

http://code.google.com/p/srbac/source/checkout

and tell me if it works now.

Cool! Now everything is fine. Thx a lot! :)

Hello Spyros,

Yes I have.

The modules are detected, but I’ve not tested how can it work using SRBAC. I’ll make some test and I’ll tell you.

Best regards,

Ricardo