commit compras1 3011
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-30 09:33:36 +02:00
parent 96b30368bc
commit 47649bd46c
163 changed files with 9419 additions and 145 deletions
+3 -1
View File
@@ -139,7 +139,9 @@ final class PrivateAuditExporter
$scope = app(PrivateAuditAccess::class)->authorise($candidate, $export->families);
$actor = $scope['actor'];
abort_unless($export->tenant_id === $actor->tenant_id && $export->created_by === $actor->id, 404);
abort_unless($scope['context'] === $export->work_context, 409, 'Seleccione o contexto original da exportação.');
abort_unless($scope['context'] === $export->work_context
|| in_array($export->id, app(PrivateAuditAccess::class)->legacyExportIds($actor, $scope['context']), true),
409, 'Seleccione o contexto original da exportação.');
$prefix = 'audit-exports/'.$actor->tenant_id.'/'.$actor->id.'/';
abort_unless(preg_match('/^'.preg_quote($prefix, '/').'[a-f0-9-]{36}\/auditoria\.zip$/D', $export->path) === 1, 409);
$disk = Storage::disk('local');