mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 04:18:34 +00:00
fix(backups): allow volume backup delete without password when 2FA off
Skip empty-password rejection so delete works when two-step confirmation is disabled; cover with a feature test.
This commit is contained in:
1 parent
ac36a59088
commit
fab012b5c8
2 files changed
+18
-1
No files matched your search
@@ -1151,6 +1151,23 @@ it('deletes local archives before deleting a volume backup schedule', function (
|
||||
&& str_contains($process->command, 'archive.tar.gz'));
|
||||
});
|
||||
|
||||
it('deletes a volume backup schedule without a password when two-step confirmation is disabled', function () {
|
||||
$team = Team::factory()->create();
|
||||
signInForVolumeBackups($this, $team);
|
||||
[$application, $volume] = createVolumeBackupApplication($team);
|
||||
InstanceSettings::get()->update(['disable_two_step_confirmation' => true]);
|
||||
$backup = $volume->scheduledBackups()->create([
|
||||
'team_id' => $team->id,
|
||||
'frequency' => 'daily',
|
||||
]);
|
||||
|
||||
Livewire::test(VolumeBackups::class, ['storage' => $volume, 'resource' => $application])
|
||||
->call('delete', '')
|
||||
->assertDispatched('success');
|
||||
|
||||
expect($backup->fresh())->toBeNull();
|
||||
});
|
||||
|
||||
it('deletes S3 archives from the storage recorded on each execution', function () {
|
||||
$team = Team::factory()->create();
|
||||
signInForVolumeBackups($this, $team);
|
||||
|
||||
Reference in new issue
Block a user