Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Filament\Auth\MultiFactor\App\Concerns\InteractsWithAppAuthenticationRecovery;
use Filament\Auth\MultiFactor\App\Contracts\HasAppAuthentication;
use Filament\Auth\MultiFactor\App\Contracts\HasAppAuthenticationRecovery;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Auth\MustVerifyEmail as MustVerifyEmailTrait;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Contracts\Translation\HasLocalePreference;
Expand All @@ -27,7 +29,7 @@
* @property ?string $app_authentication_secret
* @property ?array $app_authentication_recovery_codes
*/
class User extends Authenticatable implements CachetUser, HasAppAuthentication, HasAppAuthenticationRecovery, HasLocalePreference, MustVerifyEmail
class User extends Authenticatable implements CachetUser, FilamentUser, HasAppAuthentication, HasAppAuthenticationRecovery, HasLocalePreference, MustVerifyEmail
{
/** @use HasFactory<UserFactory> */
use HasApiTokens, HasFactory, InteractsWithAppAuthentication, InteractsWithAppAuthenticationRecovery, MustVerifyEmailTrait, Notifiable;
Expand Down Expand Up @@ -69,6 +71,14 @@ protected function casts(): array
];
}

/**
* Determine if the user can access the given Filament panel.
*/
public function canAccessPanel(Panel $panel): bool
{
return true;
}

/**
* Determine if the user is an admin.
*/
Expand Down
Loading