roles icon indicating copy to clipboard operation
roles copied to clipboard

hasPermission inside VerifyPermission is not working properly

Open giwrgos88 opened this issue 8 years ago • 3 comments

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.

giwrgos88 avatar Jan 20 '17 18:01 giwrgos88

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

Ricky-rick avatar Jan 24 '17 16:01 Ricky-rick

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

giwrgos88 avatar Jan 24 '17 18:01 giwrgos88

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', ]);

Ricky-rick avatar Jan 24 '17 20:01 Ricky-rick