An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(environment-variables): remove protected variable checks from delete methods for cleaner logic
Andras Bacsai00fe6e90034b
diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.phpindex 57952ddb3e..699dca1874 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php@@ -236,15 +236,6 @@ class All extends Componentreturn 0;}- // Check for system variables that shouldn't be deleted- foreach ($variablesToDelete as $envVar) {- if ($this->isProtectedEnvironmentVariable($envVar->key)) {- $this->dispatch('error', "Cannot delete system environment variable '{$envVar->key}'.");-- return 0;- }- }-// Check if any of these variables are used in Docker Composeif ($this->resource->type() === 'service' || $this->resource->build_pack === 'dockercompose') {foreach ($variablesToDelete as $envVar) {diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.phpindex d58151abf2..535ac6c67c 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php@@ -178,13 +178,6 @@ class Show extends Componentpublic function delete(){try {- // Check if the variable is protected- if ($this->isProtectedEnvironmentVariable($this->env->key)) {- $this->dispatch('error', "Cannot delete system environment variable '{$this->env->key}'.");-- return;- }-// Check if the variable is used in Docker Composeif ($this->type === 'service' || $this->type === 'application' && $this->env->resource()?->docker_compose) {[$isUsed, $reason] = $this->isEnvironmentVariableUsedInDockerCompose($this->env->key, $this->env->resource()?->docker_compose);