presseportale/app/Console/Commands
Kevin Adametz 7c5518dc97 Fix: rollenlose aktive Nutzer -> Backfill-Command + Import-Nachlauf
Problem: Ein eingeloggter Nutzer ohne admin/editor/customer-Rolle wird per
redirectUsersTo auf die Startseite geleitet und haengt dort fest. Ursache
sind Alt-Konten, deren Rollen-Zuweisung nie lief (frueher Import bzw. ein
nach dem User-Insert fehlgeschlagener Rollen-Sync).

- Neues Command users:backfill-portal-role (--role, --dry-run): weist aktiven,
  komplett rollenlosen Nutzern die customer-Rolle zu. api-only-Konten haben
  bereits eine Rolle und bleiben unangetastet; inaktive werden uebersprungen.
- legacy:import ruft den Backfill nach dem User-Schritt automatisch auf
  (self-heal, da updateOrCreate + Rollen-Sync nicht atomar sind).

Analyse-Ergebnis nebenbei: In der aktuellen DB war nur genau 1 echter Fall
(bereits gefixt); die zuvor genannten ~167 waren fast alle api-only (gewollt
ohne Portal-Zugriff). Command laeuft daher jetzt sauber auf 0.

Test: BackfillPortalRoleTest (customer-Zuweisung, Rollen-Erhalt bei
customer/api-only, Ueberspringen Inaktiver, dry-run).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 09:23:56 +00:00
..
AnalyzeLegacyApiAccessLogs.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
ArchiveLegacyInvoices.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
BackfillPortalRole.php Fix: rollenlose aktive Nutzer -> Backfill-Command + Import-Nachlauf 2026-07-02 09:23:56 +00:00
FixLegacyTimestamps.php Migration: PM-Datum korrekt übernehmen, UUID stabil, Zwei-Phasen-Runbook 2026-06-17 13:32:48 +00:00
GenerateDomainFavicons.php 29-05-2026 Optimierungen Fixes am Code 2026-05-29 12:42:05 +00:00
GenerateManualInvoices.php Phase 9D: Tarif-Datenmodell, Cashier und hybride Rechnungskreise STR-/MAN- 2026-06-12 10:15:46 +00:00
GrandfatherLegacySubscriptions.php Optimierung 3.5: Kleinere Zentralisierungen (VAT, findByEmail, Waehrung, Provisioning) 2026-06-19 11:14:05 +00:00
ImportLegacyData.php Fix: rollenlose aktive Nutzer -> Backfill-Command + Import-Nachlauf 2026-07-02 09:23:56 +00:00
MigrateLegacyMedia.php 19-05-2026 Rebrand Pressekonto, Hub-Flux UI und Legacy-Media-Migration 2026-05-19 16:36:13 +00:00
MigratePresseData.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
PublishScheduledPressReleases.php Phase 9 Block 1: Gelb-Routing Direkt-Live, Slot-Verbrauch bei Veroeffentlichung, Submit-Gate 2026-06-12 09:47:06 +00:00
PurgeExpiredPressReleaseDrafts.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
PurgeMagicLinks.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
ReportAdminSlowRequests.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
ReportApiUsage.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
ReportLegacyApiCustomers.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
ResetMonthlyPressReleaseQuota.php User Panel: Phase-8-Abschluss, Titelbild/Lizenzen/Zeitzonen und KI-Pruef-Pipeline 2026-06-12 08:30:13 +00:00
RunClassificationQueue.php User Panel: Phase-8-Abschluss, Titelbild/Lizenzen/Zeitzonen und KI-Pruef-Pipeline 2026-06-12 08:30:13 +00:00
SendGoLiveMails.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
SyncCompanyLogos.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
SyncPressReleaseImages.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00
SyncStripePlans.php Optimierung 3.5: Kleinere Zentralisierungen (VAT, findByEmail, Waehrung, Provisioning) 2026-06-19 11:14:05 +00:00
VerifyLegacyImport.php 12-05-2026 Frontend dev 2026-05-12 18:32:33 +02:00