images: nur freigegebene Bilder in Feed und PDF, versionierte Veröffentlichungssnapshots, Bestätigung an das gezeigte Bild gebunden, getrennte Rückhaltegründe (Umsetzungsaudit 29.09.: B-01 bis B-14, N09, OPT-3 bis OPT-5; 02.10.: O03)
- B-01/B-02: Startseiten-Feed, Card-Helfer und Nachweis-PDF nur mit isPubliclyDeliverable() - B-03: Livewire-Temp-Upload 16 MiB - N09: Snapshot je Bytes- und Metadaten-Hash inkl. OG-Variante, put() geprüft, alle Fassungen ins Archiv - O03: published_ever_at in der Freigabetransaktion (markPublishedIfNowPublic) — Kundenbestätigung, Vorab-Sichtung, Korrektur - B-04/B-14: Bestätigung an Bild-ID und SHA gebunden, unter Sperre - B-05/B-06: Entfernen unter Sperre mit frischem Stand und Archivauftrag; Korrektur archiviert über den Auftrag, Nacharbeiten abgesichert - B-07: precheck_withheld_at getrennt von withheld_at (Migration + Übernahme) - B-08, B-09, B-11, B-12: published_ever_at nur bei Status published, Admin-Eigentümer mit Kundenregel, Sweep verwaister Originale, Verarbeitungsfehler als Formularmeldung - K-02-Teil: nach Kundenbestätigung erneut routen - OPT-3 bis OPT-5: pingImage für JPEG, Hash durchgereicht, erstes Frame Admin-PM-Detailseite enthält zusätzlich K-06 (Autorisierung) und A-08 (Nachweis per POST), weil die Datei ungeteilt committet ist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
60650baeb8
commit
f1c0e2766b
23 changed files with 1675 additions and 149 deletions
|
|
@ -4,12 +4,15 @@ namespace App\Services\Image\Precheck;
|
|||
|
||||
use App\Enums\ArchiveEvent;
|
||||
use App\Enums\ArchiveReasonCategory;
|
||||
use App\Enums\PressReleaseStatus;
|
||||
use App\Models\KiAudit;
|
||||
use App\Models\PressReleaseImage;
|
||||
use App\Models\User;
|
||||
use App\Services\PressRelease\Images\PressReleaseImageRemover;
|
||||
use App\Services\PressRelease\Images\PublishedImageSnapshot;
|
||||
use App\Support\WebCaches;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Admin-Queue des Vorab-Checks (DU 12.3, 12.5): Ein Bild mit Ausgang
|
||||
|
|
@ -19,7 +22,10 @@ use Illuminate\Support\Facades\DB;
|
|||
*/
|
||||
class ImagePrecheckReviewService
|
||||
{
|
||||
public function __construct(private readonly PressReleaseImageRemover $remover) {}
|
||||
public function __construct(
|
||||
private readonly PressReleaseImageRemover $remover,
|
||||
private readonly PublishedImageSnapshot $snapshots,
|
||||
) {}
|
||||
|
||||
public function approve(PressReleaseImage $image, User $admin, string $note): void
|
||||
{
|
||||
|
|
@ -28,14 +34,33 @@ class ImagePrecheckReviewService
|
|||
'precheck_reviewed_at' => now(),
|
||||
'precheck_reviewed_by' => $admin->getKey(),
|
||||
'precheck_review_note' => $note,
|
||||
'withheld_at' => null,
|
||||
// Nur der eigene Grund fällt (Umsetzungsaudit 29.09., B-07):
|
||||
// ein Rückhalt aus dem Korrekturweg bleibt bestehen.
|
||||
'precheck_withheld_at' => null,
|
||||
])->save();
|
||||
$image->markPublishedIfNowPublic();
|
||||
|
||||
$this->audit($image, 'approved', $note);
|
||||
});
|
||||
|
||||
if ($image->pressRelease?->published_at !== null) {
|
||||
WebCaches::forgetPublicPages();
|
||||
$pressRelease = $image->pressRelease;
|
||||
|
||||
if ($pressRelease?->status === PressReleaseStatus::Published && $image->isPubliclyDeliverable()) {
|
||||
// Jetzt erst öffentlich: Veröffentlichungssnapshot (N09) nach
|
||||
// dem N08-Muster — Fehler werden gemeldet, nicht geworfen.
|
||||
try {
|
||||
$this->snapshots->capture($image, $pressRelease);
|
||||
} catch (Throwable $exception) {
|
||||
report($exception);
|
||||
}
|
||||
}
|
||||
|
||||
if ($pressRelease?->published_at !== null) {
|
||||
try {
|
||||
WebCaches::forgetPublicPages();
|
||||
} catch (Throwable $exception) {
|
||||
report($exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue