Open haltsir opened 10 years ago
Hi, How did you solve this problem?
I have the exact same problem too!!!
I end up using this:
Route::filter('manage_config', function() { if (!Entrust::can('manage_config')) { return Redirect::to('admin')->with('message', array( 'type' => 'warning', 'content' => 'No permissions for this resource.' )); } }); Route::when('admin/roles*', 'manage_config');
When I use this:
Entrust::routeNeedsPermission('admin/roles*', 'config_manage');
I get an HttpException and 500 Internal Server Error. When I use this:
Entrust::routeNeedsPermission('admin/roles*', 'config_manage', Redirect::to('admin')->with('message', array( 'type' => 'warning', 'content' => 'No permissions for this resource' )));
then the flash message appears on every click on the website.
I'm using Laravel 4.0 with the latest updates.