You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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....
The text was updated successfully, but these errors were encountered:
+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.
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....
The text was updated successfully, but these errors were encountered: