api: Bildupload v1 unter Formular v2 (Pflichtfelder, Kennung des Wortlauts, Bestätigung mit Token), Legacy-Bildupload abgeschaltet, API-Doku (Bildkennzeichnung Block C)

- StorePressReleaseImageRequest: copyright, rights_confirmed, confirm_text_version Pflicht; 422 mit aktueller Kennung; 16 MiB
- PressReleaseImageController über den gemeinsamen Uploader, Löschen über den Remover; Resource mit Portalkennzeichnung, Kundenangabe, Herkunft, Bestätigung und warnings[]
- POST /service/pressreleases/{id}/images antwortet 410 mit Hinweis auf v1 (E-B4)
- API-Seite und Sprachdateien: Felder und Rechtehinweis mit aktiver Textkennung; Paritätsdokument ergänzt

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-09-22 09:35:52 +00:00
parent 3d3ddc2dc8
commit 24184f1dec
9 changed files with 411 additions and 30 deletions

View file

@ -37,6 +37,24 @@ class PressReleaseImageResource extends JsonResource
'title' => $this->title,
'description' => $this->description,
'copyright' => $this->copyright,
// Bildkennzeichnung Block C: Portalkennzeichnung, Kundenangabe
// und Herkunft getrennt (Decision-Update S6); Bestätigung mit
// Kennung. `urls.original` bleibt das Cover — das Beweisoriginal
// ist nie über die API erreichbar (E.4).
'ai_declaration' => $this->ai_declaration?->value,
'ai_declaration_user' => $this->ai_declaration_user?->value,
'ai_declaration_source' => $this->ai_declaration_source?->value,
'ai_declaration_locked' => (bool) $this->ai_declaration_locked,
'provenance_status' => $this->provenance_status?->value,
'license_url' => $this->license_url,
'source_url' => $this->source_url,
'rights_confirmation' => $this->whenLoaded('latestRightsConfirmation', fn () => $this->latestRightsConfirmation === null ? null : [
'version' => $this->latestRightsConfirmation->legal_text_key,
'agb_version' => $this->latestRightsConfirmation->agb_version,
'confirmed_at' => $this->latestRightsConfirmation->confirmed_at?->toIso8601String(),
'channel' => $this->latestRightsConfirmation->channel?->value,
]),
'warnings' => $this->warnings(),
'is_preview' => $this->is_preview,
'sort_order' => $this->sort_order,
'width' => $this->width,
@ -46,4 +64,25 @@ class PressReleaseImageResource extends JsonResource
'updated_at' => $this->updated_at?->toIso8601String(),
];
}
/**
* Maschinenlesbare Hinweise (Feedback F04): Prüfung fehlgeschlagen,
* Kennzeichnung durch geprüfte Herkunftsdaten angehoben (Phase 2).
*
* @return list<string>
*/
private function warnings(): array
{
$warnings = [];
if ($this->provenance_status?->value === 'error') {
$warnings[] = 'provenance_check_failed';
}
if ((bool) $this->ai_declaration_locked && $this->ai_declaration !== $this->ai_declaration_user) {
$warnings[] = 'ai_declaration_raised_by_metadata';
}
return $warnings;
}
}