The multiple submits seemed that were caused by the $live = true parameter in CHtml::clientChange called by the ajaxsubmitbutton, I overidden it in SHtml and it seemed to work now. Please check the code from svn
Thanks for the fixes. I checked the most recent version (v214) from SVN. It’s almost working. The bug which was duplicate-creating AuthItems is fixed. The bug of not serializing the [data] field is fixed. But there is one more issue related to serializing:
To recreate the new bug:
Press the Gear icon
press "create" button in left panel
enter name "Test1", select type "Role"
press “create” button in right panel. Get flash message ‘test1 created successfully’
[data] field is still blank - good
on the "test1" item, enter "somedata" in [data] field, and press "save"
now [data] field shows [s:8:"somedata":], which is the serialized version. this is the error
you can update the field by replacing the entire contents, but each time Save is pressed, the serialized version is display.
This is a really great tool - thanks for creating and maintaining it, and for responding to all the requests for new features and fixes.
There’s still a problem with the autocomplete textfield that sends some dozens of queries each time so I will upgrade to Yii 1.1.3 and use the [/font][font=“Verdana”]CJuiAutocomplete instead , then I will release the new fixed version.
If there are still some problems let me know[/font]
Is there any option to load User.php class from another location (like a user module)?
For now I added in my copy of SRBAC,
>config/main.php
'userclassPath' => 'modules.hr.models.User'
and in
>SrbacModule.php
public $userclassPath = '';
public function getUserModel() {
if(!empty($this->userclassPath)){
include_once Yii::app()->basePath.DIRECTORY_SEPARATOR.str_replace('.', DIRECTORY_SEPARATOR, $this->userclassPath).'.php';
}
return new $this->userclass;
}
Hi, I’ve started looking at srbac and it looks great. I think I’ve got it mostly working but have a question:
The standard yii controller base class (Controller.php) has menu, layout and breadcrumb properties. I can only find breadcrumb properties in the AuthitemController. Is AuthitemController the correct base class to use in order to get automatic auth or is there another base class that implements the menu and layout properties? I’m sure there’s a good reason but it seems odd that SBaseController didn’t just inherit from Controller.php in the first place to retain the standard properties.
CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘yii.assignments’ doesn’t exist
I get this error when i’m trying to run the installation page. Does this mean I have to create tables for rbac manually? If so, where can I find the description for the structure?
UPDATE:
Resolved the problem, found the DB schema under /framework/web/auth/schema.sql
Site admin should be able to manage, create and update/delete everything
Client Admin should be able to manage only those offers belonging to the companies their are allowed to manage
Common user should be able to change their profile
my main problem in here is the second statement:
"Client Admin should be able to manage only those offers belonging to the companies their are allowed to manage"
I know that in admin/index actions i’ll have to include some criteria to filter the data, but in create/update/delete actions, the system should check for the rule i told
first of all, thank you - spyros - for the great extension!
I was looking for a way to use bizrules with my tasks and ended up trying different variations of "return 1==1", "return true" and so on about over an hour, until i figured out that i just had to add a semicolon at the end of it, like "return true;"
So i just wanted to add this to this thread and warn other newbs like me, maybe this is going to help someone else.
If you want to use bizrules with the extension be sure to add a semicolon at the end of your rule, unless you’re not planing to almost freak out like me