Optionally pass the database configuration parameters on Rbac constructo...#63
Optionally pass the database configuration parameters on Rbac constructo...#63sergiodlopes wants to merge 1 commit intoOWASP:masterfrom
Conversation
|
Thank you very much!!! Please let me review these changes and how they relate to current PR's and discussion and I'll get back to you shortly :-) |
|
@jburns131 bump |
|
Please, also, add ability to change role/user/permision 'id' column names. For instance, 'role_id', instead of default 'RoleID'. Thanks. |
|
what good will that do? a use case scenario please. It is possible and existed in the initial code base but was removed because of bloat.
|
|
I had some troubles integrating rbac with php-activerecord in a case like this:
class User extends ActiveRecord\Model {
static $table_name = 'users';
static $has_many = array (
array ('roles', 'through' => 'userroles',),
array ('userroles', 'class_name' => 'UserRole',),
);
}
If I defined 'foreign_key' => 'UserID' on for 'roles', the SQL would generate I needed that To get around this, I changed the column names in the respective tables and Also, I have added foreign key constraints on the relations tables. (Not AbiusX wrote:
|
|
I think that’s a good enough solution.
|
Possibility to programmatically pass on the database configuration.
Just pass the parameters into the constructor, falls back to default configuration variables (same as those in database.config file).
This change was made with regard of compatibility with existing version.