Commit Graph
359 Commits
Author SHA1 Message Date
Leo Vasanko d40a2b8682 DB transactions cleanup, better actor/user data. Simplified admin API. Use UUID to refer to a specific permission in admin API. Other cleanup. 2026-01-27 21:48:21 +00:00
Leo Vasanko e3b64ef537 Move imports to top of file. 2026-01-27 20:16:32 +00:00
Leo Vasanko a54819aba8 Remove most remaining DB getters. Add ws auth chat helper function to avoid repetition, along with the existing register chat in wschat.py. 2026-01-27 20:01:17 +00:00
Leo Vasanko 69a0aae78c Remove db.get_session. 2026-01-27 18:28:32 +00:00
Leo Vasanko 925a582869 Remove list_sessions_for_user, inline db access at call sites. 2026-01-27 18:25:29 +00:00
Leo Vasanko 8249a9b3c1 DB cleanup: removed get_permission_organizations and build_org. Using db.data() for read access at call sites. 2026-01-27 18:23:17 +00:00
Leo Vasanko 1c4fda6aa2 DB cleanup continued: Made the working copy data public in DB class. 2026-01-27 18:02:16 +00:00
Leo Vasanko 7efd7e4e98 Remove runtime expiry checks; the db background cleanup makes this unnecessary. 2026-01-27 16:55:07 +00:00
Leo Vasanko 462c21f7fa Database cleanup continues, build functions replaced by post init. Simplified some APIs. 2026-01-27 16:53:13 +00:00
Leo Vasanko 173071ead2 Missing import in migrate script. 2026-01-27 16:26:48 +00:00
Leo Vasanko e2a4143543 Consistently use UUID type in APIs instead of UUID str as option. 2026-01-27 16:24:02 +00:00
Leo Vasanko bafd62a1b1 DB getter refactoring. Documented call sites. Added separate function for by-scope permission lookup. 2026-01-27 15:54:28 +00:00
Leo Vasanko 071a7b9e0b Remove credentials: 'include', a mechanism that we don't actually use. 2026-01-27 15:23:19 +00:00
Leo Vasanko 637b1b95a8 Finalize database API class merge. 2026-01-27 03:00:18 +00:00
Leo Vasanko 73e4d41f04 Refactor API to match database, no _uuid postfixes. 2026-01-27 02:32:46 +00:00
Leo Vasanko 1b26383586 Update E2E tests with changes since a while back. 2026-01-27 02:24:09 +00:00
Leo Vasanko 2413a32bda Update the API to use new naming matching database. 2026-01-27 02:22:29 +00:00
Leo Vasanko db104d762b Finish the database key-in-object refactoring. 2026-01-27 02:11:09 +00:00
Leo Vasanko ece0ac9a16 Database cleanup, better UUID passing and construction (User model). 2026-01-27 01:25:52 +00:00
Leo Vasanko e0e1a644de Cleanup and bugfixes on Bootstrap and JSONL handling. 2026-01-26 23:54:03 +00:00
Leo Vasanko f6e995184f Refactor validate endpoint to return session context, leaving user-info only for extra profile data. Completely separate token-info for reset tokens. Simplified by reusing same data structures in various places and mandating fields to have values not needing fallbacks. Implemented consistent AccessDenied view in profile and admin apps. 2026-01-26 19:40:48 +00:00
Leo Vasanko d7665f3f8d Fix frontend-build location. Cleanup. 2026-01-25 03:26:22 +00:00
Leo Vasanko 533932b798 Fix test expected HTTP code. 2026-01-25 03:20:28 +00:00
Leo Vasanko f63f088883 Add missing set_session_host on dunder all. 2026-01-25 03:17:32 +00:00
Leo Vasanko 21364fc621 Use fastapi-vue-setup, merging its template scripts to old Paskia entry point and devserver. Simplified CLI, no longer uses serve subcommand. Fixed the URL displayed on banner to show to actual frontend/caddy server even in devmode. 2026-01-25 03:15:50 +00:00
Leo Vasanko 0097bb4011 Logging cleanup, linter. 2026-01-24 01:08:00 +00:00
Leo Vasanko f7f529d8b9 Fix errors where permission scopes were still expected for indexing. 2026-01-24 00:58:18 +00:00
Leo Vasanko 6d340ef689 Large refactoring for better JSONL context. Switched back the urlsafe for session tokens that need to be passed in URLs. Other minor fixes. 2026-01-24 00:40:32 +00:00
Leo Vasanko 2965528b26 Don't load existing JSONL on migrate. 2026-01-24 00:08:21 +00:00
Leo Vasanko 2227a9bf6f Refer permissions by UUID rather than scope. 2026-01-24 00:06:08 +00:00
Leo Vasanko 5585651e57 Debug JSONL updates. 2026-01-23 23:49:11 +00:00
Leo Vasanko 17961c2bca Debug JSONL updates. 2026-01-23 23:41:47 +00:00
Leo Vasanko 3f3cd27ec8 Debug JSONL updates. 2026-01-23 23:35:00 +00:00
Leo Vasanko a7ade8d2ac Debug JSONL updates. 2026-01-23 23:29:47 +00:00
Leo Vasanko 6a3a4afd8e Fixes to JSONL management, starting from empty state rather than default DB. 2026-01-23 21:31:54 +00:00
Leo Vasanko 3f5018918e Simplify session and reset token formats; removes the token utility functions entirely. 2026-01-23 21:01:45 +00:00
Leo Vasanko e93578f2e7 Fix actor fields and transactions for API operations as they are recorded to DB. 2026-01-23 20:19:33 +00:00
Leo Vasanko 943bda806d Update migrate script with the latest database changes. 2026-01-23 19:56:44 +00:00
Leo Vasanko aa26a16d5d Record user UUID as actor for API access. 2026-01-23 19:55:54 +00:00
Leo Vasanko 257ddc0b51 Cleanup, add database versioning. 2026-01-23 19:22:23 +00:00
Leo Vasanko 62dbf5a4ae Refactor to use UUID and bytes rather than str keys in msgspec structs because the module can automatically convert these. 2026-01-23 18:47:56 +00:00
Leo Vasanko 0674f9ceeb Database refactor to separate modules. 2026-01-23 18:35:35 +00:00
Leo Vasanko b6ee11b4de Updated database to use async background worker, making changes lock-free synchronous ops. 2026-01-23 15:57:16 +00:00
Leo Vasanko c6dadd283d Change PUT to PATCH for intent-based updates, avoiding override of fields not intended to change. This preserves role permissions matrix even if the permission is temporarily removed from the org. 2026-01-23 15:41:23 +00:00
Leo Vasanko 4c1db37c73 Better handling of Org Admin permission. More guardrails for Master Admin not locking himself out by changes. Admin app UI improvements. 2026-01-23 15:11:01 +00:00
Leo Vasanko 253387be97 Permissions refactor. Permissions have UUID and scope (previously id) and the latter no longer needs to be unique. Org admin uses a single global permission now. Domain scoped permissions. Removed from user info the admin fields, use effective_permission checks instead. 2026-01-23 13:54:31 +00:00
Leo Vasanko 291e0eae0b Replace session.renewed with .expiry for consistency with other expiring items. Fix migration script. 2026-01-23 01:39:59 +00:00
Leo Vasanko ab65f3dae2 Database cleanup: make it synchronous because we work with in-memory data. Defer writes to disk and cleanup to background task. Tests passing. 2026-01-23 01:22:47 +00:00
Leo Vasanko 887c0f92a2 Replace SQL database with JSONL based solution that keeps history. 2026-01-23 00:54:37 +00:00
LeoVasanko dfb86efc65 Update docs/Caddy.md 2025-12-19 22:53:10 +00:00