refactor(execute-container-command): simplify connection logic and improve terminal availability checks

This commit is contained in:
Andras Bacsai committed 2025-06-14 13:56:48 +02:00
1 parent 64dd648b3f
commit d1d899c0cf
3 files changed
+70 -265

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ class Terminal extends Component
public function sendTerminalCommand($isContainer, $identifier, $serverUuid)
{
$server = Server::ownedByCurrentTeam()->whereUuid($serverUuid)->firstOrFail();
if (! $server->isTerminalEnabled()) {
if (! $server->isTerminalEnabled() || $server->isForceDisabled()) {
throw new \RuntimeException('Terminal access is disabled on this server.');
}