Commit Graph
22 Commits
Author SHA1 Message Date
Leon TonhäuserandClaude Opus 5.5 2775b406bf Release 2.3.0: calendar categories, reservations, month view, dashboard
- Admin-managed event categories (name + one of Sakani's 8 calendar
  colors) at /admin/kalender/kategorien; events pick a category.
- Calendar as Sakani MonthCalendar with a German header and a color
  legend, for editorials and admins.
- "Zu meinen Alben hinzufügen" replaces RSVP: grants the event album at
  once when it exists, otherwise reserves it; the auto-rule scheduler
  grants pending reservations once the album appears. Editorials see when
  an auto rule already covers the event. event_responses is dropped.
- New admin dashboard: to-dos, next events, 30-day figures, activity.
- Photo grid reads left to right in uniform 3:2 tiles.
- Release notes 2.3.0 seeded (migration 0008).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 23:45:59 +01:00
Leon TonhäuserandClaude Opus 5.5 d479e1e79b Release 2.2.2: version history linked from the release popup
- ReleaseHistory groups release notes by version (sorted by version
  number, newest marked "Aktuell") and renders them as Sakani cards on
  /redaktion/neuigkeiten and /admin/versionen (with audience + delete).
- The "Was ist neu?" popup links to the history ("Frühere Änderungen
  ansehen") and closes on navigation.
- Release notes for 2.2.2 seeded via custom migration 0005; popup
  version bumped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:45:37 +01:00
Leon TonhäuserandClaude Opus 5.5 71110208a9 Release 2.2.1: quarterly billing and Sakani form polish
- Billing is always quarterly: the billing page opens the current
  quarter, the month view is gone, old ?month= links land in their
  quarter and invalid quarters no longer throw.
- Calendar and release-note forms and the RSVP buttons use Sakani
  components (Card, Input, Textarea, FormSelect, Button, Alert).
- Sidebar logo stays visible in dark mode (Sakani's logo tile is light).
- Release notes for 2.2.1 seeded via custom migration 0004; popup
  version bumped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:38:32 +01:00
Leon Tonhäuser 7204dd6b60 feat: v2.2 batch (calendar, self-service, sort, description, filename search, stats, collab, invoice) on pre-redesign base 2026-11-30 21:20:13 +01:00
Leon Tonhäuser abe072b2d1 feat: admin hints with auto-expiry shown in album overview 2026-09-11 17:30:15 +02:00
Leon Tonhäuser 0b65fbba16 fix: rebuild migration history as baseline so migrate works on prod
Squash the 13 historical migrations into one generated baseline whose
journal entry reuses the original 0000 timestamp: the migrator skips it
on every existing database (prod journal stuck at 0006) and applies it
only on fresh ones. Parity with the old chain verified via pg_dump diff
plus fresh/existing/prod-simulated drizzle-kit migrate runs. Historical
files move to drizzle-history/pre-squash-2026-08/ for integration tests
that exercise legacy migration behavior.

Also repair db tests that already failed before this change:
- raw SQL targeted users, but the table has always been "user"
- membership recheck mocked legacy getAsset.albums instead of searchPhotos
- audit rollback assertion walks drizzle's wrapped error cause chain
- keyset index probe pinned to NULLS LAST ordering, removing a planner
  cost tie-break that flipped with index creation order
2026-08-25 11:56:52 +02:00
Leon Tonhäuser 11cde23cdb fix: complete two_factor schema to full plugin field set
Adds failedVerificationCount and lockedUntil (brute-force tracking
maintained by the two-factor plugin). The adapter rejects any
two-factor endpoint while declared fields are missing from the drizzle
schema; verified was already added in the previous commit.
2026-08-25 03:27:51 +02:00
Leon Tonhäuser f42f4d5d2d fix: add missing two_factor.verified column required by plugin
The two-factor plugin reads/writes a verified boolean on the twoFactor
model (set true by verify-totp); without it the drizzle adapter rejects
every /two-factor/enable call.
2026-08-25 03:13:02 +02:00
Leon Tonhäuser 0d939593c8 feat: enforce admin 2FA, step-up auth, stronger password policy
Implements OWASP audit recommendations P1-P3:

P1 - Two-factor authentication (TOTP) mandatory for admins:
- better-auth twoFactor plugin; new two_factor table + user flag
  (migration 0010, MUST run before deploying the app)
- requireAdmin throws TWO_FACTOR_REQUIRED without a finished setup;
  pages redirect to the new /zwei-faktor wizard which uses a weak
  guard (allowWithoutTwoFactor) so admins can never lock themselves
  out. Wizard lives outside /admin to avoid layout redirect loops.
- login flow handles twoFactorRedirect and asks for the TOTP code;
  backup codes are shown once during enablement

P2 - Step-up for destructive operations (ASVS 2.5.4):
- hardDeleteEditorialAction and resetUsageDataAction reject sessions
  older than 15 minutes (SESSION_STALE) with actionable German
  messages instead of throwing opaque digests

P3 - Password policy (NIST 800-63B):
- minimum length raised from 8 to 12 plus common-password denylist,
  enforced for registration AND reset/change via a before-hook
2026-08-25 02:30:58 +02:00
Leon Tonhäuser 86dfe8053d fix: harden production flows and user messaging 2026-08-11 16:07:13 +02:00
Leon Tonhäuser 0b1ffdfdfc feat: Add flatrate billing model for editorial accounts 2026-08-11 03:27:10 +02:00
Leon Tonhäuser 699580a6a0 chore: generate drizzle migration for archived_at and auto_rules 2026-08-11 03:05:10 +02:00
Leon Tonhäuser 21871bb9ff feat: harden portal security and auditability 2026-08-10 21:46:54 +02:00
Leon Tonhäuser ba673ad732 fix: harden download history and attempt ledger 2026-08-10 16:45:40 +02:00
Leon Tonhäuser 8871e4794a feat: stream originals with download accounting 2026-08-10 13:10:13 +02:00
Leon Tonhäuser c400167b8f fix: enforce one active logical album grant 2026-08-10 12:14:38 +02:00
Leon Tonhäuser 3cdca5c82c fix: preserve legacy accounting migration data 2026-08-10 11:39:44 +02:00
Leon Tonhäuser 3de1530074 fix: harden usage accounting idempotency 2026-08-10 10:59:12 +02:00
Leon Tonhäuser 22fe6bf659 feat: add usage and download intent accounting 2026-08-09 22:52:27 +02:00
Leon Tonhäuser b84562ad52 fix: add approval migration snapshot 2026-08-09 21:27:50 +02:00
Leon Tonhäuser 3f84b840d9 fix: serialize editorial approval delivery 2026-08-09 21:23:32 +02:00
Leon Tonhäuser 7acaacb92e feat: add portal database schema 2026-08-09 20:26:18 +02:00