Skip to content

Commit

Permalink
Merge pull request #77 from user-aquadic/main
Browse files Browse the repository at this point in the history
filament()->auth()->user() instead of auth()->user()
  • Loading branch information
RickDBCN authored Sep 1, 2024
2 parents 1b6c240 + f68e47e commit dcd27f9
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 dcd27f9

Please sign in to comment.