Commit Graph
391 Commits
Author SHA1 Message Date
Leo Vasanko a0de041348 More of a normal white path color. 2026-01-29 16:57:30 +00:00
Leo Vasanko d8743d9f90 Refactor to separate paskia lib functionality generally useful for various apps. 2026-01-29 16:55:46 +00:00
Leo Vasanko 760b109eef Consistent and stronger session revalidation checks in Auth profile and Admin App. Fix missing handling of link generation network errors. 2026-01-29 16:02:29 +00:00
Leo Vasanko f89e812c86 Logging cleanup, better colors, suppress more useless messages. Enable reloading in devmode again (needs uvicorn.run to function). 2026-01-29 14:49:22 +00:00
Leo Vasanko 33f6512b4b Smarter change logging on console. 2026-01-28 23:22:13 +00:00
Leo Vasanko f3646ed6c5 Improved access logging. 2026-01-28 23:01:35 +00:00
Leo Vasanko 6b8a2a2376 Cleanup 2026-01-28 20:31:33 +00:00
Leo Vasanko 89d0a12a6f Implement versioning in metadata, outside of the DB itself. Cleanup to migration handling and changes. Implement new migration step using msgspec normalization. 2026-01-28 20:23:00 +00:00
Leo Vasanko 5ec50be922 Add migrate:msgspec for changes in schema that don't require version bump. Rename the other migrations to migrate:sql and migrate:v{N}. 2026-01-28 19:24:15 +00:00
Leo Vasanko 93fd496254 Cleanup 2026-01-28 19:17:24 +00:00
Leo Vasanko ff3c4a00e5 Modules missing git add 2026-01-28 19:04:18 +00:00
Leo Vasanko a70eba3440 Make database changes outside of transaction a fatal error. Fix bootstrap and migrate to work with various latest changes. 2026-01-28 19:04:00 +00:00
Leo Vasanko 21f3a713f6 Fix a bug with validate returning 401 when a session was refreshed. Simplify & cleanup. 2026-01-28 18:45:02 +00:00
Leo Vasanko 7614d0e8d9 API to use msgspec structs as well. 2026-01-28 18:31:45 +00:00
Leo Vasanko b79f367495 Implement full ORM. Various other cleanup. 2026-01-28 17:19:56 +00:00
Leo Vasanko dcc89181b7 Move get_session_context to DB.session_ctx(). 2026-01-28 14:52:18 +00:00
Leo Vasanko 6546b0730d Problem solved, remove extraneous migration, reset to v1. 2026-01-28 02:29:53 +00:00
Leo Vasanko f59451d3b4 Debug DB problem 2026-01-28 02:27:26 +00:00
Leo Vasanko ed8de169de Credential update was being done out of transaction, now part of login. 2026-01-28 02:22:47 +00:00
Leo Vasanko f29bd98020 Debug DB problem 2026-01-28 02:19:54 +00:00
Leo Vasanko 9983245652 Remove get_session_context setting of host (now read only op as expected). Make session host, ip and user_agent always set (the ua potentially empty string). 2026-01-28 02:14:34 +00:00
Leo Vasanko 78a7c4f07a Fix migration logic. 2026-01-28 02:02:18 +00:00
Leo Vasanko 614e5a289d Fix migration logic. 2026-01-28 01:58:36 +00:00
Leo Vasanko f90d9e4eb1 Implement migration to remove created_at timestamp from Orgs that already has one, bumping db v1. 2026-01-28 01:52:33 +00:00
Leo Vasanko c6a7429f11 Remove Org.created_at to maintain compatibility with old versions (the field was not being used). 2026-01-28 01:31:35 +00:00
Leo Vasanko e3ff1f9db1 Hardened PATCH handling (only allow updating select fields). Hardened DB transactions, rollback. 2026-01-28 01:13:05 +00:00
Leo Vasanko 8a6540aa91 Fix background task still running twice, and add a check to prevent that happening again (double expiry). 2026-01-27 23:51:13 +00:00
Leo Vasanko 4cf0bda26d Disable API docs that display very much broken due to missing request/response typing. 2026-01-27 23:27:42 +00:00
Leo Vasanko dea62d799f Remove unnecessary use of async now that db access doesn't need awaiting. 2026-01-27 23:16:17 +00:00
Leo Vasanko 46083d8bce Broken import 2026-01-27 22:46:49 +00:00
Leo Vasanko b09fb7fe26 DB background worker cleanup, avoid issue with double cleanup. Faster write to disk. 2026-01-27 22:21:33 +00:00
Leo Vasanko 43ffb31414 Cleaner typing to avoid some checking errors. 2026-01-27 22:04:14 +00:00
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