Secure resource custom page

How can I secure a custom page within a resource for users who do not have a specific permission? I have hidden the action button with this, but if I type the URL of the custom page enters without problems: https://filamentphp.com/docs/3.x/actions/trigger-button#authorization
1 Reply
bwurtz999
bwurtz99914mo ago
A custom middleware is probably the best option. You can check the route a user is trying to access and then if it's the route you want to protect, run a check for the proper permissions Add it to the ->middleware([]) array in the panel provider Or you could use a Policy
Want results from more Discord servers?
Add your server