Closed stephenjude closed 1 year ago
This is not a bug, this method runs user provided callback function so if user pass invalid code then there will be error. For example if someone pass non existent method to the canViewThemesPage
then there will be error
canViewThemesPage(fn () => non_existent_method())
What happened?
When a Filament user logs out this method
canViewThemesPage(fn () => auth()->user()->is_admin)
returns aCall to a member function can() on null
error due to the absence of authenticated user object.How to reproduce the bug
canViewThemesPage(fn () => auth()->user()->is_admin)
.Package Version
3.0
Filament Version
3.0
PHP Version
8.2
Laravel Version
10
Notes
No response