mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 08:18:08 +00:00
fix(backups): enforce authorization and safe retention
- Gate volume backup retention and S3 controls by update permission - Preserve backup records when S3 deletion fails - Share SFTP download streaming with consistent missing-file handling - Handle schedule creation errors and link service database backups
This commit is contained in:
1 parent
99a8a96e7f
commit
72a0a57f0e
13 files changed
+433
-112
No files matched your search
@@ -84,7 +84,24 @@ class FileStorage extends Component
|
||||
$this->hasEnabledBackup = $backup?->enabled ?? false;
|
||||
$this->backupUrl = null;
|
||||
|
||||
if (! $this->hasEnabledBackup || ! $this->resource instanceof Application) {
|
||||
if (! $this->hasEnabledBackup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->resource instanceof ServiceDatabase) {
|
||||
$this->backupUrl = route('project.service.database.backups', [
|
||||
'project_uuid' => $this->resource->service->project()->uuid,
|
||||
'environment_uuid' => $this->resource->service->environment->uuid,
|
||||
'service_uuid' => $this->resource->service->uuid,
|
||||
'stack_service_uuid' => $this->resource->uuid,
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->resource instanceof Application) {
|
||||
$this->hasEnabledBackup = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user