mirror of
https://github.com/pelican-dev/panel.git
synced 2025-07-01 01:41:08 +02:00
22 lines
377 B
PHP
22 lines
377 B
PHP
<?php
|
|
|
|
namespace App\Traits\Filament;
|
|
|
|
use App\Models\Server;
|
|
use Filament\Facades\Filament;
|
|
|
|
trait BlockAccessInConflict
|
|
{
|
|
public static function canAccess(): bool
|
|
{
|
|
/** @var Server $server */
|
|
$server = Filament::getTenant();
|
|
|
|
if ($server->isInConflictState()) {
|
|
return false;
|
|
}
|
|
|
|
return parent::canAccess();
|
|
}
|
|
}
|