Filament::navigation and permissions
I am creating my navigation inside a ServiceProvider with
Filament::navigation
callback, by adding custom groups.
- How can I prevent showing NavigationItem
s based on the current user?
- I am using resource getNavigationItems()
methods as well. Why is this not taking the policies into account?
Example:
7 Replies
Only add them to the array if the user has permissions?
ok, so there is no build in logic? Because when just using the resources, the permissions are respected and users only see resources they are allowed to see
No, I don't think there is some Closure magic for this part.
and there is even no
->visible
method 😦Yeah, it's not that sexy, but just use if conditions and an array 😅
ah ok, its because this check is in another method:
Please open a separate thread and don’t just post into random questions