Open abdulquddus opened 9 years ago
You have to create class first before you can use it as rule . Read more ( http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#using-rules)
I have created a class in backend\rbac folder with the name of ItemRules. Now when I create a Rule and give the classname as \backend\rbac\itemrules get the following error.
Keep in mind that this rbac folder is separated from the one in the vendor folder. secondl y I gave namespace to backend\rbac at the top of the itemRules.php file. What am i doing wrong.
Have you solvedd this? I have the same issue D:
Yes I've been able to solve the problem by creating a folder in the backend named it rbac. Then I have added all the rules one by one in that folder. When tried to create the rule "backend\rbac\AuthorRule" given this in the class name without quotes.
Hi, Sorry could be a silly question. This is my first time to use RBAC in any YII2 project. I want to ask is what is the class name in the RULEs. As what ever I give to it got every class does not exist. Hope you won't mind of this silly question as I'm a learner. Thanks in advance.