From e41730a209dd7b16161bcec62decb8b6f26a4939 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:23:23 +0200 Subject: [PATCH 1/2] chore(versions): update coolify version to 4.0.0-beta.421 and nightly version to 4.0.0-beta.422 --- config/constants.php | 2 +- other/nightly/versions.json | 4 ++-- versions.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/constants.php b/config/constants.php index 40e749086..c932241d4 100644 --- a/config/constants.php +++ b/config/constants.php @@ -2,7 +2,7 @@ return [ 'coolify' => [ - 'version' => '4.0.0-beta.420.10', + 'version' => '4.0.0-beta.421', 'helper_version' => '1.0.10', 'realtime_version' => '1.0.10', 'self_hosted' => env('SELF_HOSTED', true), diff --git a/other/nightly/versions.json b/other/nightly/versions.json index 1fe1859cc..21a9b6d70 100644 --- a/other/nightly/versions.json +++ b/other/nightly/versions.json @@ -1,10 +1,10 @@ { "coolify": { "v4": { - "version": "4.0.0-beta.420.10" + "version": "4.0.0-beta.421" }, "nightly": { - "version": "4.0.0-beta.420.11" + "version": "4.0.0-beta.422" }, "helper": { "version": "1.0.10" diff --git a/versions.json b/versions.json index 1fe1859cc..21a9b6d70 100644 --- a/versions.json +++ b/versions.json @@ -1,10 +1,10 @@ { "coolify": { "v4": { - "version": "4.0.0-beta.420.10" + "version": "4.0.0-beta.421" }, "nightly": { - "version": "4.0.0-beta.420.11" + "version": "4.0.0-beta.422" }, "helper": { "version": "1.0.10" From d98b7ab7e058616cd1d6691befb82f0e8beacf30 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 26 Aug 2025 21:44:36 +0200 Subject: [PATCH 2/2] feat(policies): add EnvironmentVariablePolicy for managing environment variables ( it was missing ) --- app/Policies/EnvironmentVariablePolicy.php | 73 +++++++++++++++++++ app/Providers/AuthServiceProvider.php | 1 + .../environment-variable/show.blade.php | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 app/Policies/EnvironmentVariablePolicy.php diff --git a/app/Policies/EnvironmentVariablePolicy.php b/app/Policies/EnvironmentVariablePolicy.php new file mode 100644 index 000000000..21e2ea443 --- /dev/null +++ b/app/Policies/EnvironmentVariablePolicy.php @@ -0,0 +1,73 @@ + \App\Policies\ServiceDatabasePolicy::class, \App\Models\Project::class => \App\Policies\ProjectPolicy::class, \App\Models\Environment::class => \App\Policies\EnvironmentPolicy::class, + \App\Models\EnvironmentVariable::class => \App\Policies\EnvironmentVariablePolicy::class, \App\Models\SharedEnvironmentVariable::class => \App\Policies\SharedEnvironmentVariablePolicy::class, // Database policies - all use the shared DatabasePolicy \App\Models\StandalonePostgresql::class => \App\Policies\DatabasePolicy::class, diff --git a/resources/views/livewire/project/shared/environment-variable/show.blade.php b/resources/views/livewire/project/shared/environment-variable/show.blade.php index 63148b74c..258c65219 100644 --- a/resources/views/livewire/project/shared/environment-variable/show.blade.php +++ b/resources/views/livewire/project/shared/environment-variable/show.blade.php @@ -54,7 +54,7 @@ @endif @endcan - @can('manageEnvironment', $this->resource) + @can('update', $this->env)