-
Notifications
You must be signed in to change notification settings - Fork 19
Permission deny for master after migration #35
Comments
Hi zainiafzan, Did you assign master role to some user? The line you mentioned scan only rbac module to allow access to permissions management. |
no...its first master after installation. imho, yii command didnt read params that i pass to it.. |
I will check this assumption of course, but this line only scan permission controllers, not the main admin controllers, which should be scanned by default. Could you access the dashboard index page? |
(you should login to access admin pages, if you're not logged in - admin will show you 404 page) |
Would be great if you can ping me in Skype: ab.prokopenko, it will be easier to communicate |
yes i logged in, using master [email protected] after manually change and run rbac again.. master can access dashboard.. and successfully scan other route using scan route permission... |
More info from Zain: Happens on:
Re-tested by me and was fine on:
Maybe there is a problem with Windows paths or Windows PHP build |
The bug is confirmed, Windows OS doesn't pass console command options to the controller correctly. |
After further investigation Zain found out, that Windows do not parse command options correctly and leave quotes. That's why scan was not successful. Project readme is updated to run command without quotes (it's good that we don't have spaces there). |
I have the same issue
|
It's not clear what URL you're trying to access from your screenshot. Would be great to have also screens from running rbac commands (on fresh install): php yii rbac/init I didn't test this on PHP 7.2 yet. |
Ok, this is the issue, I run exactly those commands in the console. The first time, when I try acces I get the error 403, but when a run to second time the same commands the error disappear. Now I can access the URL |
Could you try to run full installation from scratch and make screenshots of a console where you launch rbac commands. It should print info about what's happening. The issue Zain had - permissions weren't imported in any command run. In your case it works for a second time. Maybe you forgot to run the last command? |
After installation and migration RBAC using this command
php yii rbac/scan -p='@vendor/justcoded/yii2-rbac/' -b='admin/rbac/'
Master have error cannot access dashboard..
Temporary fix is manually change params in
justcoded\yii2\rbac\commands\RbacController
line 22 and line 33.
The text was updated successfully, but these errors were encountered: