Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

Laravel rootNeedsPermission function executes first #337

Open cstpraveen opened 9 years ago

cstpraveen commented 9 years ago

I am using laravel 5. I have added RootNeedsPermission in my root. At the same time I am using middleware auth function to login if the user is logged in. But RootNeedsPermission runs first before the middleware auth function. So I cannot track correctly if the user is logged in. When I login using admin permission it shows as I dont have permission.

gabka913 commented 9 years ago

Same issue here. entrust should use middleware for route permission checking, instead of deprecated router->when method.