mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 06:36:51 +01: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();
 | 
						|
    }
 | 
						|
}
 |