Commit Graph

6 Commits

Author SHA1 Message Date
sysops a6a66beaa8 chore: weitere Code-Aufteilung (api.ts, hooks, ldap_sync)
- src/lib/api.ts (1085 Zeilen) → 5 thematische Module unter src/lib/api/
  (core, users, ldap, tenants, mail, system) + index.ts Re-Export
- useLDAPConfig / useTenantLDAPConfig / useTenantUsers Hooks extrahiert;
  admin/page.tsx nutzt diese statt roher useState-Blöcke
- handleSyncTenantLDAP, handleAdminSyncTenantLDAP, doSyncTenantLDAP,
  buildTenantTestConfig, syncResult aus ldap_tenants.go in ldap_sync.go verschoben

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:05:19 +01:00
sysops db433e5c2e fix: Rollenhierarchie domain_admin/superadmin in Frontend
- useAuth: neue Rollen domain_admin/superadmin + hasRole() helper
- Admin-Page: useAuth(domain_admin), isSuperAdmin-Flag
- Tabs LDAP/Security/Mandanten/Module nur für superadmin
- Navbar: Admin-Link für domain_admin + superadmin sichtbar
- User-Anlage: domain_admin-Rolle wählbar, superadmin nur für superadmin

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 21:23:24 +01:00
sysops bb963a796f security: Zufallspasswörter beim Erststart, kryptographisch sichere JTI-Generierung
- seedDefaultUsers: generiert kryptographisch zufällige Passwörter (crypto/rand)
  statt hartkodiertes "archivmailrockz" — Passwörter werden einmalig im Terminal
  angezeigt und können danach nicht wiederhergestellt werden
- generateJTI: verwendet crypto/rand (16 Byte, hex) statt time.UnixNano XOR deadbeef

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 01:19:24 +01:00
sysops 7e165c8eed feat(PROJ-1): httpOnly Cookie, Auditor-Guard, Nutzer-Aktionen (C)
Backend:
- Login setzt httpOnly SameSite=Strict Cookie (archivmail_session)
- Logout löscht Cookie + blacklistet Token
- authMiddleware: Cookie first, Bearer als Fallback (CLI kompatibel)

Frontend:
- api.ts: credentials: include statt localStorage/Bearer Token
- updateUser(), deleteUser() hinzugefügt
- useAuth: kein localStorage mehr, nur /api/auth/me
  requireRole: "admin" | "auditor" | undefined
- Login-Seite: kein localStorage
- Navbar: kein localStorage
- Admin: Nutzer-Aktionen (Sperren/Freischalten, Löschen, Passwort-Reset)
  Löschen verhindert wenn letzter Admin (HTTP 409)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 19:57:13 +01:00
sysops d360c9a5ba feat(PROJ-17): Admin Dashboard Systemauslastung immer anzeigen
- Systemauslastungs-Sektion wird immer gerendert (nicht nur bei Erfolg)
- Fehlermeldung wenn /api/admin/system/stats nicht erreichbar ist
- Feature-Status auf In Review gesetzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:43:19 +01:00
“alexvisualmakers” 3aa2072cca feat: Add comprehensive shadcn/ui component library
Install 35 shadcn components for standard business application:

Base: Button, Input, Label, Card
Forms: Form, Select, Checkbox, Radio, Switch, Textarea
Auth/Feedback: Dialog, Alert, AlertDialog, Toast, Sonner
Dashboard: Table, Tabs, Avatar, Badge, Dropdown, Popover, Tooltip
Navigation: NavigationMenu, Sidebar, Breadcrumb, Sheet, Command
Data Display: Skeleton, Progress, Separator, ScrollArea, Collapsible,
              Accordion, Pagination

Includes hooks (use-toast, use-mobile) and updated Tailwind config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:20:39 +01:00