bezhanSalleh / filament-shield

The easiest and most intuitive way to add access management to your Filament Panel; Resources, Pages & Widgets through `spatie/laravel-permission`
MIT License
1.75k stars 195 forks source link

3rd party pages workaround suggestion #388

Closed SerjoA closed 3 months ago

SerjoA commented 5 months ago

first of all thank you for your amazing work. i have installed the library, configured and setup everything correctly but could not get the plugin work with 3rd party pages. even after i read the discord messages , the only thing i could do is to block access to a page but not hide it from the navigation, even after i created a filament page and extended the 3rd party page and added the trait mentioned in the docs. this is tedious and not good by my count. my laravel version is: 11.8.0 filament is : 3.2 i suggest a workaround i found. pasting the screenshots here - this will help with both blocking access to the page and removing it from navigation, without copy it to a new page and extend the 3rd party page and add the trait.

first step in terminal: CleanShot 2024-05-24 at 23 53 23@2x

second step inside panel provider: CleanShot 2024-05-24 at 23 53 12@2x

denismart commented 3 months ago

It does not work because most of plugins does not have canAccess

SerjoA commented 3 months ago

thank you for the info