[EXTENSION] srbac : Web interface for the administration of rbac
#1
Posted 05 July 2009 - 11:48 AM
It uses the CDbAuthManager so it needs a database (MySQL and SQlite are tested)
In this first alpha version you can do:
Create, update and delete Auth items (roles, tasks, operations)
Assign operations to tasks, tasks to roles and roles to users.
You can't yet assign operations to users, tasks to operations etc.
Demo http://spyros.agilit...authItem/assign
Extension http://www.yiiframew...xtension/srbac/
#2
Posted 13 July 2009 - 01:08 AM
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 19 columns parent, child are not unique
/home/www/spyros.agilityhoster.com/yii/framework/db/CDbCommand.php(211)
#3
Posted 13 July 2009 - 03:35 AM
"userclass"=>"User",
How to configure this? Do I need to create a user class?
#4
Posted 13 July 2009 - 03:45 AM
Quote
"userclass"=>"User",
How to configure this? Do I need to create a user class?
Yes , you must have a user class if you want to use the extension
#5
Posted 14 July 2009 - 01:00 AM
Dear creator, do u have a plan for next release?
I need to know create my own interface, modify SRbac extension or wait some days for new version.
#6
Posted 14 July 2009 - 03:08 AM
If anyone finds bugs that need to be fixed, or has an idea to add, it will be implemented asap.
Is this release stable enough to become the version 1?
Do you want something to be added?
Thanks for your interest
#7
Posted 14 July 2009 - 04:11 AM
Quote
Have you added the srbac module in you config file
<?php
'modules'=>array('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)
"debug"=>true,
// The number of items shown in each page (default:15)
"pageSize"=>10,
)
),
?>
[code]
#8
Posted 14 July 2009 - 04:24 AM
$action = $_POST['action'];
of the acionInstall() method of the AuthItemController class.
Can you help me to resolve this problem?
#9
Posted 14 July 2009 - 04:33 AM
Quote
Quote
Have you added the srbac module in you config file
<?php
'modules'=>array('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)
"debug"=>true,
// The number of items shown in each page (default:15)
"pageSize"=>10,
)
),
?>
[code]
This problem reason was wrong directory of srbac. Browser really couldn't find this path
Yes, i have added srbac in the main config file of the application to the 'modules' section.
#10
Posted 14 July 2009 - 04:44 AM
error_reporting = E_ALL
in your php ini
You may overide it by changing it to
error_reporting = E_ALL & ~E_NOTICE
or wait until I fix this issues (update should be up tonight)
#12
Posted 14 July 2009 - 05:10 AM
But i see massive of warnings and errors when try open page assign page.
Also for install i do some changes in the code for detemine variables, because install.php did not know vars $error and $disabled. After installation i see test data on default page index.php?r=srbac/authItem/ , page work normaly.
Then i try page index.php?r=srbac/authItem/assign and look on many errors about Post['action'] and about var's based on it and other POST data.
For fix it i do next with AuthItemController:
add under line 84
$userid = '';
$active = "tab1";
$message = "";
add after block //Init values finished:
if(Yii::app()->request->isPostRequest){
$userid = $_POST[Yii::app()->getModule('srbac')->userclass][$this->module->userid];
}
After this actions page /index.php?r=srbac/authItem/assign work and show me tab's.
On trying use the buttons '>>>' and '<<<', on any tab, i catch the Fatal error:
Undefined index: User AuthItemController.php(105)
After this i write the my first today msg. in this thread and back to real application.
Now i go to home and do test this ext. on full clean yii 1.07 w/o something
If it will work fine i will search the bug.
I hope on Your help Spyros.
This ext. is very usefull, if u need help i'm ready for action. Anywhere i will construct interface for manage RBAC. may be based on this ext, may be not.
Wait Your reply.
#13
Posted 14 July 2009 - 05:43 AM
error_reporting = E_ALL & ~E_NOTICE
in the php.ini (my fault) so I saw no errors while developing
I will fix the errors in the next release
#14
Posted 14 July 2009 - 06:03 AM
Use this and tell me if there are still any problems
Attached File(s)
-
srbac_quickFix.rar (18.75K)
Number of downloads: 2
#15
Posted 14 July 2009 - 07:56 AM
Quick fix work fine. @.
I do some tests for assign and deassign users, roles and tasks.
and found some interface bugs.
I did next:
First
When open the ?r=srbac/authItem/assign i see all assigned items in the Assigned control (middle select on each tab)
Second
Does not see caution message when press the <<< or >>>
when wrong selection.
Third
-select role or task tab
-select item in Assigned control
-press <<< or >>>
interface move to users tab
#17
Posted 14 July 2009 - 11:39 PM
I think extension need the tabled input methods or import methods for write many AuthItems. Also a model in CVS files look more readiable.
For very far future: very nice will add a graphical interface :-)
#18
Posted 14 July 2009 - 11:50 PM
- open srbac/authItem/admin
- click Update action on any AuthItem from list
- Change Name field
- Save
----- Catch a error message 'The requested page does not exist.'
#19
Posted 15 July 2009 - 02:53 AM
I 'll look if there's a way to safely change the name of any item
#20
Posted 16 July 2009 - 02:04 AM
in my case SERIAL (I'm use Postgres).
And setup interface for use its fields

Help















