-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally pass the database configuration parameters on Rbac constructo... #63
base: master
Are you sure you want to change the base?
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.