Navigation group not respecting shield permissions

When I don't have a builder navigation group in the app service provider's boot method, Filament Shields permissions are respected, and navigation items hidden according to permission.
But when I add my navigation groups using builder, all users can see every resource in the navigation sidebar.. Is there something I can do to get it to respect the permissions in the same way?
Maybe something I need to put in ->isActiveWhen without manually hard coding each one to each specific permission that is already set in shield?

Filament::navigation(function (NavigationBuilder $builder): NavigationBuilder { return $builder ->items([ NavigationItem::make('Dashboard') ->icon('heroicon-o-home') ->activeIcon('heroicon-s-home') ->isActiveWhen(fn (): bool => request()->routeIs('filament.pages.dashboard')) ->url(route('filament.pages.dashboard')), ]) ->groups([ NavigationGroup::make('Settings') ->items([ ...Profile::getNavigationItems(), ]), NavigationGroup::make('Site Admin') ->items([ ...UserResource::getNavigationItems(), ]), NavigationGroup::make('Super Admin') ->items([ ...CompanyResource::getNavigationItems(), ...AllUserResource::getNavigationItems(), ...RoleResource::getNavigationItems(), ]), ]); });
Was this page helpful?