Legacy-API-Paritaet S1+S2: connektar-Flow verhaltensgleich + KI-Schalter

Eigene Compat-Controller (Api/Legacy) fuer die 5 real genutzten
/service-Endpoints (Prod-Log-Beleg): Company-/Kontakt-Create (liefen
410!), PM-Create, Bild-Upload, published-only-GET — verschachtelte
Alt-Params, 201+Location+{}, Alt-Fehlerformat, Hit-Zaehlung,
Legacy-Land-Mapping.

- Anlegen = Einreichen (Alt-Verhalten); Sofort-Publish via neuer
  Permission api:immediate-publication (WS-7: connektar zuweisen)
- Admin-Schalter 'KI-Pruefung Legacy-API' (app_settings-Tabelle,
  Toggle auf /admin/press-releases): an = review + KI-Routing
- Admin-PM-Liste: KI-Spalte (Ampel-Badge) + manueller Pruef-Button
  ohne Routing fuer ungepruefte PMs
- Mails bei API-Einlieferern an Pressekontakt, sonst Firmen-Mail,
  Fallback Einlieferer (User-Entscheidung 10.07.)
- Tests: LegacyServiceParityTest (connektar-Flow end-to-end);
  Suite 1182 gruen

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-10 14:09:40 +00:00
parent 5a352425d7
commit 6a45ebf607
15 changed files with 906 additions and 24 deletions

View file

@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Laufzeit-Schalter mit Admin-UI (erster Nutzer: „KI-Prüfung Legacy-API",
* Entscheidung 10.07.2026). Key-Value, Werte als JSON.
*/
return new class extends Migration
{
public function up(): void
{
Schema::create('app_settings', function (Blueprint $table) {
$table->string('key', 100)->primary();
$table->json('value')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('app_settings');
}
};

View file

@ -33,6 +33,11 @@ class RolesAndPermissionsSeeder extends Seeder
'newsletter:subscribe',
'users:manage',
'roles:manage',
// Legacy-API-Parität (10.07.2026): Bestandskunden mit dem alten
// immediatePublication-Recht (connektar) veröffentlichen per
// /service-POST sofort — sofern der Admin-Schalter „KI-Prüfung
// Legacy-API" aus ist. Zuweisung je User (WS-7-Checkliste).
'api:immediate-publication',
];
foreach ($permissions as $permission) {