Skip to content

Commit

Permalink
filament()->auth()->user() instead of auth()->user()
Browse files Browse the repository at this point in the history
  • Loading branch information
user-aquadic authored Sep 1, 2024
1 parent 1b6c240 commit f68e47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Filament/Resources/EmailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ public static function canAccess(): bool
{
$roles = config('filament-email.can_access.role', []);

if (method_exists(auth()->user(), 'hasRole') && ! empty($roles)) {
return auth()->user()->hasRole($roles);
if (method_exists(filament()->auth()->user(), 'hasRole') && ! empty($roles)) {
return filament()->auth()->user()->hasRole($roles);
}

return true;
Expand Down

0 comments on commit f68e47e

Please sign in to comment.