mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 14:14:52 +00:00
fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and standardize public IDs across deployment and resource flows.
This commit is contained in:
1 parent
9dca7ca351
commit
062ad57740
83 files changed
+824
-278
No files matched your search
@@ -2,13 +2,20 @@
|
||||
|
||||
namespace App\Livewire\Project\Database;
|
||||
|
||||
use App\Models\StandalonePostgresql;
|
||||
use Exception;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
class InitScript extends Component
|
||||
{
|
||||
use AuthorizesRequests;
|
||||
|
||||
#[Locked]
|
||||
public StandalonePostgresql $database;
|
||||
|
||||
#[Locked]
|
||||
public array $script;
|
||||
|
||||
@@ -35,6 +42,7 @@ class InitScript extends Component
|
||||
public function submit()
|
||||
{
|
||||
try {
|
||||
$this->authorize('update', $this->database);
|
||||
$this->validate();
|
||||
$this->script['index'] = $this->index;
|
||||
$this->script['content'] = $this->content;
|
||||
@@ -48,6 +56,7 @@ class InitScript extends Component
|
||||
public function delete()
|
||||
{
|
||||
try {
|
||||
$this->authorize('update', $this->database);
|
||||
$this->dispatch('delete_init_script', $this->script);
|
||||
} catch (Exception $e) {
|
||||
return handleError($e, $this);
|
||||
|
||||
Reference in new issue
Block a user