Sorin
Sorin
FFilament
Created by Sorin on 4/9/2024 in #❓┊help
Where is the Filament\Actions\Concerns\CanBeHidden::authorize() method in the documentation ?
It would make sense, based on the name of the methods. Thank you very much for the answers.
8 replies
FFilament
Created by Sorin on 4/9/2024 in #❓┊help
Where is the Filament\Actions\Concerns\CanBeHidden::authorize() method in the documentation ?
Hmm, oke. Do you know if they also throw a 403 if an unauthorised user tries to send a request to the action, or only hide the action button ?
8 replies
FFilament
Created by Sorin on 4/9/2024 in #❓┊help
Where is the Filament\Actions\Concerns\CanBeHidden::authorize() method in the documentation ?
Thank you for the response. I don't see the authorize() method on the page that you've provided. My code looks something like this:
Action::make('Accept')->authorize(fn (Request $request): bool => $request->status === RequestStatus::PENDING && auth()->user()->isAdmin()),
Action::make('Accept')->authorize(fn (Request $request): bool => $request->status === RequestStatus::PENDING && auth()->user()->isAdmin()),
, and Action is: Filament\Infolists\Components\Actions\Action
8 replies