nova-multiple-dashboard icon indicating copy to clipboard operation
nova-multiple-dashboard copied to clipboard

Apply viewAny to a Dashboard

Open ronnytorresmtz opened this issue 6 years ago • 0 comments

Hi,

As you know Nova let you to decide if you want to display a resource in the Sidebar based on a Policy with a method viewAny.

Does it work with your package?

I tried it but I could not make it work.

My dashboard is call Users and also I have a Users Resource

After I add this code to the UserPolicy the Users Resource disappears from the Sidebar but not the User Dashbord

public function viewAny(User $user) { return false; }

Do you know why? Am I missing something?

Thank you for any help,

ronnytorresmtz avatar Feb 05 '19 22:02 ronnytorresmtz