Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour of permission #23

Closed
cerkauskas opened this issue Aug 29, 2016 · 2 comments
Closed

Strange behaviour of permission #23

cerkauskas opened this issue Aug 29, 2016 · 2 comments

Comments

@cerkauskas
Copy link

Hello.
I am really loving this package! I've been using this successfully for a while now. However, today I got a problem. I set up "admin" role with permission "manage-roles".
But $user->can('manage-roles') == false.
Moreover, $user->hasRole('admin') == true.
So I set up a little testing:
$role = \App\Role::where('name', 'admin')->first();
Finds my role - cool.
dump($role->permissions);
Through relations property I can see that "manage-roles" entry of Role model - cool again.
dump($role->hasPermission('manage-roles'));
I get false. I can't understand why. Any ideas?
Thank you!

@cerkauskas
Copy link
Author

Woops, cache. :)

@jpmurray
Copy link

jpmurray commented Nov 6, 2016

Hey, thanks for having gone through that, I didn't figure myself that I had a cache refreshing need! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants