Closed lujisheng closed 10 years ago
Are you sure then class is exist and inherited from yii\rbac\Rule
?
Check the namespace and ensure autoloadable
not yet.
Can you give me a example?
I am using yii2-app-advance templete, have not add other component.
There is only one class is exist and inherited from yii\rbac\Rule.
It is 'mdm\admin\components\RouteRule'.
Is it right?
There is only one class is exist and inherited from yii\rbac\Rule. It is 'mdm\admin\components\RouteRule'. Is it right?
Ya. But i am not sure this will be useful for you. You should create your own Rule class. At admin/rule/create, spesify Class Name
field with your Rule className.
see http://www.yiiframework.com/doc-2.0/guide-authorization.html#using-rules.
I will try.Thank you very much!
A small addition: In class name field you must enter full name of class as 'app\rbac\TestRule'.
Hi! Thanks for your work!
I can not create a rule, it said, 'Unknown Class:*** '
Can you fix it?
Thanks!