recht: Meldeverfahren v2 Phasen 5+7 — DSGVO-Strukturformular, 10-€-Checkout mit KI-Vorprüfung, Triage & Panel-Modal
Phase 7 (Spur D, E2 revidiert): KI-Vorprüfung VOR der Zahlung im Modal — rot lehnt ohne Zahlung ab, gelb/grün führt zum Stripe-Checkout (SinglePurchaseType::Change, 10 € netto), nach Zahlungseingang übernimmt der Webhook die geprüfte Fassung sofort (applyPaid: Snapshot, Sperre, Verlauf). Nur einmal je PM; Obergrenze legal.change_max_distance_percent (50 %) verhindert die verdeckte Selbst-Depublizierung. Phase 5 (Spur B): strukturiertes Schwärzungsformular mit Pflicht-Vorschau im verifizierten Web-Bereich UND als Modal im Kunden-Panel; Admin-Editor wird aus payload.redaction vorbefüllt. Umsetzungsmail LegalRequestExecuted an Antragsteller, Bestätigungsmail PressReleaseChangeApplied (Spur A/D, neuer abbestellbarer Typ press_release_corrected). Außerdem: - Re-Sync-Sperre + Sitemap-Invalidierung fest in depublish() verankert (Lücke im bezahlten Webhook-Pfad geschlossen) - Öffentliche „Rechtliches"-Seite als zweistufige Triage: primär der Portal-Anmeldelink, Formular nur Fallback mit Identifizierungs-Hinweis; Store auf report/dsgvo/personal_rights gehärtet - Panel-Button „Ändern/Melden" öffnet Anliegen-Modal (4 Spuren) statt des Web-Formulars - Pressekontakt-Fallback für Legacy-Bestände (30k PMs ohne Verknüpfung): Detailseite + pressContactEmail() nutzen PM-Kontakt → Firmen-Kontakt → Firmendaten - Korrektur-Gate entity-fest (Editor-Normalisierung zählt nicht als Änderung), toEditorHtml() in Admin-Edit + Korrektur-Panel, Wochenlimit-Hinweis in Text und Bremsen-Meldung Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b4b2e013d6
commit
9afbedddeb
40 changed files with 2507 additions and 169 deletions
|
|
@ -15,6 +15,7 @@ use App\Models\MagicLink;
|
|||
use App\Models\PressRelease;
|
||||
use App\Scopes\PortalScope;
|
||||
use App\Services\Auth\MagicLinkGenerator;
|
||||
use App\Services\PressRelease\AnonymizationService;
|
||||
use App\Support\WebPortalContext;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
|
@ -161,7 +162,7 @@ class PressReleaseReportController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function storeConcern(Request $request, string $edition): RedirectResponse
|
||||
public function storeConcern(Request $request, string $edition): View|RedirectResponse
|
||||
{
|
||||
$verified = $this->verifiedContext($request);
|
||||
|
||||
|
|
@ -174,6 +175,11 @@ class PressReleaseReportController extends Controller
|
|||
$validated = $request->validate([
|
||||
'concern' => ['required', 'string', 'in:'.implode(',', array_keys(self::CONCERNS))],
|
||||
'message' => ['required', 'string', 'min:10', 'max:5000'],
|
||||
// Spur B (Phase 5): strukturierter Schwärzungsauftrag.
|
||||
'redaction_terms' => ['required_if:concern,dsgvo', 'nullable', 'string', 'max:2000'],
|
||||
'detach_contacts' => ['nullable', 'boolean'],
|
||||
'remove_images' => ['nullable', 'boolean'],
|
||||
'confirmed' => ['nullable', 'boolean'],
|
||||
]);
|
||||
|
||||
$pressRelease = $verified['press_release'];
|
||||
|
|
@ -192,6 +198,54 @@ class PressReleaseReportController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'source' => 'self_service',
|
||||
'concern' => $validated['concern'],
|
||||
];
|
||||
|
||||
if ($validated['concern'] === 'dsgvo') {
|
||||
$terms = $this->redactionTermList((string) ($validated['redaction_terms'] ?? ''));
|
||||
$detachContacts = $request->boolean('detach_contacts');
|
||||
$removeImages = $request->boolean('remove_images');
|
||||
|
||||
if ($terms === [] && ! $detachContacts && ! $removeImages) {
|
||||
throw ValidationException::withMessages([
|
||||
'redaction_terms' => __('static.pm_report.dsgvo_validation_empty'),
|
||||
]);
|
||||
}
|
||||
|
||||
$preview = app(AnonymizationService::class)->preview($pressRelease, $terms);
|
||||
|
||||
if ($terms !== [] && $preview['total_hits'] === 0) {
|
||||
throw ValidationException::withMessages([
|
||||
'redaction_terms' => __('static.pm_report.dsgvo_validation_no_hits'),
|
||||
]);
|
||||
}
|
||||
|
||||
// Pflicht-Diff (Konzept §Spur B): erst die Vorschau bestätigen,
|
||||
// dann einreichen — ohne gesehenen Diff keine Anfrage.
|
||||
if (! $request->boolean('confirmed')) {
|
||||
return view('web.melden-pm-anliegen', [
|
||||
'pressRelease' => $pressRelease,
|
||||
'contactEmail' => $this->maskEmail($verified['contact_email']),
|
||||
'dsgvoPreview' => $preview,
|
||||
'dsgvoInput' => [
|
||||
'redaction_terms' => (string) ($validated['redaction_terms'] ?? ''),
|
||||
'detach_contacts' => $detachContacts,
|
||||
'remove_images' => $removeImages,
|
||||
'message' => $validated['message'],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
$payload['redaction'] = [
|
||||
'terms' => $terms,
|
||||
'detach_contacts' => $detachContacts,
|
||||
'remove_images_requested' => $removeImages,
|
||||
'preview_total_hits' => $preview['total_hits'],
|
||||
];
|
||||
}
|
||||
|
||||
$legalRequest = LegalRequest::query()->create([
|
||||
'press_release_id' => $pressRelease->id,
|
||||
'portal' => $pressRelease->portal?->value,
|
||||
|
|
@ -199,10 +253,7 @@ class PressReleaseReportController extends Controller
|
|||
'status' => LegalRequestStatus::Open->value,
|
||||
'requester_email' => $verified['contact_email'],
|
||||
'message' => $validated['message'],
|
||||
'payload' => [
|
||||
'source' => 'self_service',
|
||||
'concern' => $validated['concern'],
|
||||
],
|
||||
'payload' => $payload,
|
||||
'requester_ip' => $request->ip(),
|
||||
'verified_at' => now(),
|
||||
'verification_method' => $verified['method'],
|
||||
|
|
@ -222,6 +273,22 @@ class PressReleaseReportController extends Controller
|
|||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Zeilen-Eingabe („ein Begriff pro Zeile") in eine bereinigte,
|
||||
* eindeutige Begriffsliste wandeln.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
private function redactionTermList(string $raw): array
|
||||
{
|
||||
return collect(preg_split('/\r\n|\r|\n/', $raw) ?: [])
|
||||
->map(fn (string $term): string => trim($term))
|
||||
->filter()
|
||||
->unique()
|
||||
->values()
|
||||
->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifizierten Kontext aus der Session lesen — abgelaufene Marker und
|
||||
* verschwundene PMs beenden die Sitzung.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue