Open zainalawaludin opened 8 years ago
Looked into this quickly. Not very simple to achieve.
Assuming you currently use yii\rbac\DbManager
, you would need to extend this class. It should be noted this class is not a model, but instead uses insert/delete sql commands directly, so you would need to implement models for each of the tables that it uses.
Hello @zainalawaludin It is being discussed an improvement for RBAC, so it uses ActiveRecord classes and consequently ActiveQuery, which I believe can resolve this issue.
https://github.com/yiisoft/yii2/issues/570 https://github.com/yiisoft/yii2/pull/6872
Best Regards
Hi how to implement this extension on RBAC ? i want log each change like auth_item, auth_assigment, auth_item_child, but i confuse where i put 'bedezign\yii2\audit\AuditTrailBehavior'. FYI i use Yii::$app->authManager for CRUD. Thanks