© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
3 replies
Harvey

Action authorize() method not working

I have an action on a model called claim that is related to updaing a document.

My action below uses a method on the DocumentPolicy to tell whether a user can upload a document.

It no longer works like in v3, as the method
downloadRequiredDocument
downloadRequiredDocument
never gets called, and I can not see the button etc.

I can see that even though I include
Document::class
Document::class
to the method it still tries to call a method on the
ClaimPolicy
ClaimPolicy
(using ray).

Is this a bug, or am I missing something?

My action:
Action::make('download')
  ->iconButton()
  ->icon('heroicon-m-arrow-down-tray')
  ->tooltip('Download')
  ->authorize('downloadRequiredDocument', Document::class)
Action::make('download')
  ->iconButton()
  ->icon('heroicon-m-arrow-down-tray')
  ->tooltip('Download')
  ->authorize('downloadRequiredDocument', Document::class)


My DocumentPolicy method:
public function downloadRequiredDocument(User $user)
{
    ray('downloadRequiredDocument called');
    return $user->is_admin;
}
public function downloadRequiredDocument(User $user)
{
    ray('downloadRequiredDocument called');
    return $user->is_admin;
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

action method not working on a standalone Action
FilamentFFilament / ❓┊help
3y ago
Authorize an action
FilamentFFilament / ❓┊help
2y ago
Utility Injection on action method not working
FilamentFFilament / ❓┊help
3y ago
action not working
FilamentFFilament / ❓┊help
3y ago