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

getPermissionTo not working until run php artisan cache:forget spatie.permission.cache #43

Closed
loveyuxiao opened this issue Oct 7, 2018 · 3 comments

Comments

@loveyuxiao
Copy link

attach permission to role, and the User has the role.
i can see the user has all permission:
Text::make('name', function () use ($request) {
return $request->user()->getAllPermissions()->pluck('name');
}),
but i use $request->user()->hasPermissionTo('User_Edit'), it return false。
after i run php artisan cache:forget spatie.permission.cache 。it return true and work fun....

@XGhozt
Copy link

XGhozt commented Oct 17, 2018

+1 only way I was able to get new permissions that were attached to a role to show up on the user was to clear the cache and/or logout and login again.

@XGhozt
Copy link

XGhozt commented Oct 17, 2018

Actually this is a duplicate of #4

@vyuldashev
Copy link
Owner

Just tagged v1.4.4, the bug should disappear now.

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

3 participants