windhoney / yii2-rest-rbac

yii2 rbac yii2 rest RBAC Auth manager for Yii2 RESTful(YII2权限管理rbac--rest接口方式)
https://windhoney.gitbooks.io/yii2-rest-rbac/
MIT License
82 stars 20 forks source link

models/Menu里的表名hard code问题 #28

Closed ansonhorse closed 5 years ago

ansonhorse commented 5 years ago

https://github.com/windhoney/yii2-rest-rbac/blob/4cbd9ee902495b1787075ad9688d57bd86bd1a00/models/Menu.php#L199

这个是不是可以通过authManager来获取?

Yii::$app->getAuthManager()->itemTable
ansonhorse commented 5 years ago

顺便说一个疑问: components/DbManager.php里的groupTablegroupChildTable都是静态属性,我的疑问是,为什么不跟itemTable这些一样,定义为常规的属性,这样就可以在配置authManager时指定这两个表名了。

windhoney commented 5 years ago

顺便说一个疑问: components/DbManager.php里的groupTablegroupChildTable都是静态属性,我的疑问是,为什么不跟itemTable这些一样,定义为常规的属性,这样就可以在配置authManager时指定这两个表名了。

项目中还是有一些不完善的地方待优化!

ansonhorse commented 5 years ago

哈哈当然,所谓众人拾柴火焰高,会越来越好用的。

windhoney commented 5 years ago

哈哈当然,所谓众人拾柴火焰高,会越来越好用的。

有时间在重新整理整理,完善一下,感谢提出问题。哈哈~~