dorfteich/apps/api/prisma/migrations
Claude Fable 5 6aac785841
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 6m55s
CI / Build container images (pull_request) Successful in 3m0s
CI / Auth e2e pack (pull_request) Successful in 8m49s
CI / Import/export fidelity gate (pull_request) Successful in 58s
CD / Build and push images (push) Successful in 21s
CD / Deploy to Test (push) Successful in 14s
CD / Smoke tests against Test (push) Successful in 1m19s
CD / Promote to Int (push) Successful in 12s
CI / Lint, typecheck, test (push) Successful in 6m28s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 8m15s
CI / Import/export fidelity gate (push) Successful in 59s
#217: map IdP groups and roles onto the permission model
Declarative instance setting idpMapping.rules turns ID-token claims into
pond roles and the site-admin flag on every OIDC login — configuration,
not code. Mapped grants travel through the SAME GrantsService path as
manual ones (permission cache invalidated, collab access notify fires so
live sessions revalidate — asserted by test), never raw rows.

Ownership makes precedence explicit: role_grants.origin marks mapped
rows, users.is_site_admin_managed marks a mapping-set admin flag. The
mapping only creates and revokes what it owns — manual wins: hand-made
grants and hand-promoted admins are never revoked by a missing claim (a
manual toggle clears the marker and takes ownership). Removal of a claim
revokes the mapped grant and the managed flag on the next login. Every
mapping-driven change is audited with origin idp_mapping.

Failure containment: unknown pond slugs and the last-Pond-Admin
protection log-and-skip — a mapping problem must never become a login
lockout. Tests drive real OIDC logins against the fake IdP with group
claims: grant + working access, revocation incl. notify, manual-wins,
managed site-admin promote/demote/hands-off.

Documented in permissions.md (own section), ADR 0021, data-model.md and
the hardening guide (care rule: same PR).

Refs #217.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUtYMxwTCMHG9mVHnwbFg8
2026-07-31 13:09:11 +02:00
..
20260704171456_init Add Prisma with PostgreSQL, automatic migrations, and /readyz 2026-07-04 19:16:44 +02:00
20260704224132_auth_models Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
20260705090100_ponds Ponds: data model, CRUD API, personal pond on verification (#21) 2026-07-05 11:08:16 +02:00
20260705185146_quotas Quota foundation: overrides, resolution, race-safe consumption (#22) 2026-07-05 20:55:59 +02:00
20260705200714_pages Add page CRUD and Yjs state persistence (#23) 2026-07-05 22:25:41 +02:00
20260708082627_attachments Add file storage service and image upload API (#27) 2026-07-08 10:35:03 +02:00
20260708101011_trash_and_jobs Add page trash: soft delete, restore, and purge job (#31) 2026-07-08 12:48:17 +02:00
20260709060328_collab_open_sessions Add Yjs update-log compaction job (#40) 2026-07-09 08:15:55 +02:00
20260709062007_page_versions Fix compaction test Bytes typing for strict typecheck (#40) 2026-07-09 08:23:55 +02:00
20260709062727_page_version_created_by Add version snapshots: automatic, named, thinning (#41) 2026-07-09 08:37:07 +02:00
20260709082418_labels Add hierarchical labels: model, CRUD API, and validation (#43) 2026-07-09 10:30:17 +02:00
20260709104519_page_links Add wikilink index, backlinks API, and phantom resolution (#47) 2026-07-09 12:54:10 +02:00
20260709111040_search_vector Add SearchProvider interface with PostgreSQL FTS (#49) 2026-07-09 13:25:05 +02:00
20260709115727_role_grants Add grant model and shared permission-resolution algorithm (#51) 2026-07-09 14:02:07 +02:00
20260709140000_owner_admin_grants Enforce permissions in API guards and retire interim access (#52) 2026-07-09 16:31:41 +02:00
20260710035316_conversion_jobs Add conversion job queue and pandoc sidecar integration (#62) 2026-07-10 04:06:27 +02:00
20260710041215_import_pages_conversion Import .docx and .odt documents as new pages (#63) 2026-07-10 07:34:43 +02:00
20260710120000_data_export_expiry Add self-service GDPR data export (#68) 2026-07-10 13:01:51 +02:00
20260710130000_plugins Add plugin storage, install API, and directory watcher (#71) 2026-07-10 16:55:26 +02:00
20260711100000_setup_completed_backfill Add the first-run setup wizard API with env-backed secret store (#80) 2026-07-11 15:10:28 +02:00
20260711180000_audit_log_and_job_duration Add Site-Admin system panel with persistent audit trail (#86) 2026-07-11 20:03:05 +02:00
20260711220000_comments Add threaded page comments: data model, API, and comment policy (#91) 2026-07-11 21:42:29 +02:00
20260711230000_watches Add watches: follow pages and ponds with auto-watch preferences (#93) 2026-07-11 22:59:11 +02:00
20260712000000_notifications Notify watchers about page changes and comments, with an in-app center (#94) 2026-07-11 23:20:25 +02:00
20260712010000_digest_frequency Batch notifications into localized e-mail digests with unsubscribe (#95) 2026-07-11 23:37:26 +02:00
20260712020000_api_tokens Public REST API v1: personal access tokens, instance switch + per-pond opt-in (#104) 2026-07-12 11:17:03 +02:00
20260714000000_page_hierarchy Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
20260714120000_conversion_job_options Obsidian vault import: endpoint, job orchestration, rollback (#117) 2026-07-14 17:13:11 +02:00
20260716000000_page_favorites Favorites: personal page stars, golden icons, sidebar filter (#132) 2026-07-16 12:03:55 +02:00
20260719223755_page_time_filter_indexes #148: Seitenlisten filtern nach createdSince/updatedSince 2026-07-20 00:49:52 +02:00
20260719224240_feed_tokens #149: Atom-Feeds für Teiche und Seiten, privat via Feed-Token 2026-07-20 00:49:53 +02:00
20260719232202_page_mentions #151: Mention-Benachrichtigungen über die Glocke 2026-07-20 01:25:16 +02:00
20260730120000_drop_attachment_deleted_at #194: orphan-file sweep, drop the unused Attachment.deletedAt 2026-07-30 13:19:58 +02:00
20260730140000_clear_trashed_search_vectors #195: trashed content leaves the search index itself 2026-07-30 14:07:34 +02:00
20260730170000_prune_conversion_job_payloads #233: prune conversion job payloads for every job kind 2026-07-30 22:12:32 +02:00
20260731090000_attachment_sha256 #199: SHA-256 integrity hashes for attachments 2026-07-31 04:32:29 +02:00
20260731120000_page_classification #204: classification as first-class page metadata (ADR 0022) 2026-07-31 06:01:50 +02:00
20260731150000_read_events #222: read-access trail for classified pages 2026-07-31 12:12:55 +02:00
20260731160000_read_events_dedup #223: dedup window for the read trail 2026-07-31 12:13:21 +02:00
20260731170000_read_events_partitioned #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
20260731190000_idp_claim_mapping #217: map IdP groups and roles onto the permission model 2026-07-31 13:09:11 +02:00
migration_lock.toml Add Prisma with PostgreSQL, automatic migrations, and /readyz 2026-07-04 19:16:44 +02:00