refactor(frontend): Consent-Flow auf Cookie-basiertes Frontend-Handling umgestellt #138

Closed
opened 2026-06-28 21:31:51 +00:00 by niboer · 0 comments
Owner

Beschreibung

Der Consent-Flow wird vom Backend (403-Forced-Consent) ins Frontend verlagert. Das Backend schreibt nach erfolgreichem Consent ein HttpOnly-Cookie consent_granted. Das App-Layout prueft dieses Cookie und zeigt den ConsentDialog, wenn es fehlt.

Aufgaben

  • Dashboard: ConsentDialog-Import + consentRequired/consentEventId aus Dashboard entfernen (+page.server.ts, +page.svelte)
  • App-Layout (+layout.server.ts): consent_granted-Cookie auslesen → consentRequired an Layout uebergeben
  • App-Layout (+layout.svelte): Wenn consentRequired, ConsentDialog ueber children() rendern; nach Consent location.reload()
  • Account-Seite (+page.svelte): "Einwilligung erteilen"-Button mit fetch an Invitations → Consent-API → Reload
  • docs/design/02-datenmodell.md aktualisieren (DSGVO-Abschnitt: Cookie statt Backend-Guard)
  • Tests: Dashboard, Account, Layout anpassen
## Beschreibung Der Consent-Flow wird vom Backend (403-Forced-Consent) ins Frontend verlagert. Das Backend schreibt nach erfolgreichem Consent ein HttpOnly-Cookie `consent_granted`. Das App-Layout prueft dieses Cookie und zeigt den ConsentDialog, wenn es fehlt. ## Aufgaben - [ ] Dashboard: ConsentDialog-Import + `consentRequired`/`consentEventId` aus Dashboard entfernen (`+page.server.ts`, `+page.svelte`) - [ ] App-Layout (`+layout.server.ts`): `consent_granted`-Cookie auslesen → `consentRequired` an Layout uebergeben - [ ] App-Layout (`+layout.svelte`): Wenn `consentRequired`, ConsentDialog ueber children() rendern; nach Consent `location.reload()` - [ ] Account-Seite (`+page.svelte`): "Einwilligung erteilen"-Button mit fetch an Invitations → Consent-API → Reload - [ ] `docs/design/02-datenmodell.md` aktualisieren (DSGVO-Abschnitt: Cookie statt Backend-Guard) - [ ] Tests: Dashboard, Account, Layout anpassen
Sign in to join this conversation.
No description provided.