© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
12 replies
ChesterS

Resource visible in sidebar even if `viewAny()` returns false

As per title, I have a resource that's only available to certain users.

According to the docs here https://filamentphp.com/docs/3.x/panels/resources/getting-started#authorization the link should not be visible if they don't have access to it. However, that's not the case for me. They can still see the link but they get a 403 when trying click on it (as expected)

The navigation menu is build 'manually'

->navigation(function (NavigationBuilder $builder): NavigationBuilder {
    return $builder
        ->groups([
            NavigationGroup::make('Setup')
                ->items([
                    ...TeamResource::getNavigationItems(), // Do I need to do anything here?
                ]),
        ])
    })
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
    return $builder
        ->groups([
            NavigationGroup::make('Setup')
                ->items([
                    ...TeamResource::getNavigationItems(), // Do I need to do anything here?
                ]),
        ])
    })

(not sure what else I need to provide. The resource itself is as boilerplate as it gets)

When I put a breakpoint in the
viewAny()
viewAny()
call in the policy, it looks like it's never hit.

Am I missing something or doing something wrong?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

EditAction visible even if canEdit return false
FilamentFFilament / ❓┊help
5mo ago
Can't edit a resource if viewAny() is false (Model Policy)
FilamentFFilament / ❓┊help
3y ago
Resource not in sidebar
FilamentFFilament / ❓┊help
2y ago
Problem with viewAny in a FIlament Resource
FilamentFFilament / ❓┊help
12mo ago