mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 06:23:23 +00:00
Require admin team membership for destination mutations, return invalid-token responses for tokenless requests, and remove standalone Docker networks when deleting destinations.
17 lines
484 B
PHP
17 lines
484 B
PHP
<?php
|
|
|
|
namespace App\Actions\Destination;
|
|
|
|
use App\Models\StandaloneDocker;
|
|
|
|
class RemoveStandaloneDockerNetwork
|
|
{
|
|
public function handle(StandaloneDocker $destination): void
|
|
{
|
|
$safeNetwork = escapeshellarg($destination->network);
|
|
|
|
instant_remote_process(["docker network disconnect {$safeNetwork} coolify-proxy"], $destination->server, throwError: false);
|
|
instant_remote_process(["docker network rm -f {$safeNetwork}"], $destination->server);
|
|
}
|
|
}
|