canAccessPanel() Not being called
I am triying to secure access but my canAccessPanel() is not being called. I am using FilamentUser contract in User. And below is my code. to test i am always retirnung false but i am still able to access panel. I cleared all caches.
4 Replies
Is your environment
local
?Hi @Dennis Koch . I tested in both local and production.
I suggest looking if you have a piece of code that does this:
Gate::before(function ($user, $ability) {
return $user->super_admin == 1 ? true : null;
});
But that is just a hunchDo you implement the interface on the user model?