Closed z010107 closed 8 years ago
There are plans to port RBAC classes to be active records. this would allow using them on different noSQL dbms.
It would be nice
I think we may need to add a schema-mongo.sql table under yii2/rbac to create auth tables. Does the current rbac implementation works for mongo?
yii2\rbac\DbManager generate SQL query to the database
...
$query = new Query; // <== is query builder
$parents = $query->select(['parent'])
->from($this->itemChildTable)
->where(['child' => $itemName])
->column($this->db);
...
to support noSQL databases, you must use ActiveRecord
$parents = AuthItemChild::find()
->select(['parent'])
->where(['child' => $itemName])
->column($this->db);
Resolved by https://github.com/yiisoft/yii2-mongodb/pull/110
Hello everyone. I have one project where I use MongoDB. Current version RBAC is not support Mongo DbManager. That is why I make MongoDbManager.php.
Code here: https://github.com/z010107/yii2_rbac_mongodb Usage:
Put this class into /framework/rbac/MongoDbManager.php And change config