mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 19:44:12 +00:00
docs: add tenant SMTP admin-save troubleshooting notes
This commit is contained in:
parent
80f7fd2e75
commit
01a0a43f39
2 changed files with 23 additions and 0 deletions
|
|
@ -169,6 +169,7 @@ Beispiel: `src/migrations/20260109_020000_add_blogwoman_collections.ts`
|
||||||
- **Admin Login:** Custom Route mit Audit-Logging (`src/app/(payload)/api/users/login/route.ts`)
|
- **Admin Login:** Custom Route mit Audit-Logging (`src/app/(payload)/api/users/login/route.ts`)
|
||||||
- **Queue Worker:** PM2 nutzt `node_modules/tsx/dist/cli.mjs` direkt (nicht `npx`), `exec_mode: 'fork'`
|
- **Queue Worker:** PM2 nutzt `node_modules/tsx/dist/cli.mjs` direkt (nicht `npx`), `exec_mode: 'fork'`
|
||||||
- **PgBouncer:** Transaction-Mode kann Migrationen stören → `./scripts/db-direct.sh`
|
- **PgBouncer:** Transaction-Mode kann Migrationen stören → `./scripts/db-direct.sh`
|
||||||
|
- **Tenant SMTP Save (Stand 17.02.2026):** Bei conditional `email.smtp` keine Feld-`required` auf `host/user`; stattdessen Group-`validate` verwenden. Tenant-Audit-Hook darf Admin-Save nicht mit `await` blockieren.
|
||||||
- **TRUST_PROXY=true:** PFLICHT hinter Reverse-Proxy, sonst funktionieren Rate-Limiting und IP-Allowlists nicht
|
- **TRUST_PROXY=true:** PFLICHT hinter Reverse-Proxy, sonst funktionieren Rate-Limiting und IP-Allowlists nicht
|
||||||
- **CSRF_SECRET:** PFLICHT in Production (oder PAYLOAD_SECRET) - Server startet nicht ohne
|
- **CSRF_SECRET:** PFLICHT in Production (oder PAYLOAD_SECRET) - Server startet nicht ohne
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,28 @@ curl -X POST https://pl.porwoll.tech/api/send-email \
|
||||||
- `src/lib/email/payload-email-adapter.ts` - Payload-Integration
|
- `src/lib/email/payload-email-adapter.ts` - Payload-Integration
|
||||||
- `src/hooks/invalidateEmailCache.ts` - Cache-Invalidierung
|
- `src/hooks/invalidateEmailCache.ts` - Cache-Invalidierung
|
||||||
|
|
||||||
|
### Troubleshooting: Tenant SMTP Save hängt im Admin
|
||||||
|
|
||||||
|
Stand: 17. Februar 2026
|
||||||
|
|
||||||
|
**Symptom:**
|
||||||
|
- Beim Speichern eines Tenants mit aktivem `email.useCustomSmtp` bleibt das Admin Panel bei "wird aktualisiert" hängen.
|
||||||
|
- SMTP-Werte werden nicht zuverlässig in `tenants` persistiert.
|
||||||
|
|
||||||
|
**Ursachen (behoben):**
|
||||||
|
- Die SMTP-Felder lagen in einer conditional Group (`email.smtp`), während `required: true` auf Unterfeldern (`host`, `user`) serverseitig weiterhin greifen konnte.
|
||||||
|
- Feld-Validierungen nutzten teilweise `siblingData` mit falschem Scope in der verschachtelten Struktur.
|
||||||
|
- `afterChange` im Tenant-Audit-Log wartete synchron auf `payload.create()` für `audit-logs` und konnte die Admin-Response blockieren.
|
||||||
|
|
||||||
|
**Implementierter Fix:**
|
||||||
|
- Konditionale Pflichtvalidierung auf Gruppenebene `email.smtp.validate` verschoben (Prüfung gegen `email.useCustomSmtp`).
|
||||||
|
- `required: true` von `email.smtp.host` und `email.smtp.user` entfernt; stattdessen explizite Group-Validierung.
|
||||||
|
- Tenant-Audit-Hooks auf Fire-and-Forget umgestellt (`.catch(...)` statt `await`), analog zu User-Audit-Hooks.
|
||||||
|
|
||||||
|
**Relevante Dateien:**
|
||||||
|
- `src/collections/Tenants.ts`
|
||||||
|
- `src/hooks/auditTenantChanges.ts`
|
||||||
|
|
||||||
## Newsletter (Double Opt-In)
|
## Newsletter (Double Opt-In)
|
||||||
|
|
||||||
DSGVO-konformes Newsletter-System mit Double Opt-In.
|
DSGVO-konformes Newsletter-System mit Double Opt-In.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue