I use https://github.com/mdmsoft/yii2-admin and I'm using Yii::$app->authManager->checkAccess() to check if the user has access to a route and it works.
What is the actual result?
Right now, I added some Rules to my RBAC permissions and tried to use the checkAccess function like checkAccess(Yii::$app->user->id,'/cars/activity-log?car_id=32') then it returns false even though when I visit the actual URL, the site was accessible. What I'm guessing is it doesn't check the URL if it returns 403 or permission denied Error but it checks the auth_assignment table if the route and user_id exist in that table.
Question
Do we have an RBAC function which is something like checkUrlAccess($userId, $url) and returns the error code?
What steps will reproduce the problem?
I use
https://github.com/mdmsoft/yii2-admin
and I'm using Yii::$app->authManager->checkAccess() to check if the user has access to a route and it works.What is the actual result?
Right now, I added some Rules to my RBAC permissions and tried to use the checkAccess function like checkAccess(Yii::$app->user->id,'/cars/activity-log?car_id=32') then it returns false even though when I visit the actual URL, the site was accessible. What I'm guessing is it doesn't check the URL if it returns 403 or permission denied Error but it checks the auth_assignment table if the route and user_id exist in that table.
Question
Do we have an RBAC function which is something like checkUrlAccess($userId, $url) and returns the error code?