romanbican / roles

Powerful package for handling roles and permissions in Laravel 5
MIT License
1.16k stars 296 forks source link

hasPermission inside VerifyPermission is not working properly #207

Open giwrgos88 opened 7 years ago

giwrgos88 commented 7 years ago

Hello, I saw that the VerifyPermission is not working properly. Basically it's always returning true event if the user doesn't have the permission. Does anyone knows how I can fix it? For example if I do

dd($this->auth->user()->userPermissions)

I see a collection of the permissions that the current authenticated user has. The list doesn't contains the permission that the variable $permission has but stills returns true.

Ricky-rick commented 7 years ago

We decided to update and maintain a copy of bican roles. This issue is fixed in this copy. You can find it on packagist: https://packagist.org/packages/ultraware/roles

giwrgos88 commented 7 years ago

@Ricky-rick it's your package that I'm using and is not working. Plus issues are close to your repository

Ricky-rick commented 7 years ago

Issues are open now. Could you open a issue there and provide a more detailed example? Example from the readme $router->post('/example', [ 'as' => 'example', 'middleware' => 'permission:edit.articles', 'uses' => 'ExampleController@index', ]);