SnapOtter
4c997f73e0
fix: seed anonymous user row in DB and add comprehensive test coverage
...
When AUTH_ENABLED=false, seed an "anonymous" user row in the users
table so API keys, pipelines, and user files don't fail with FK
constraint violations. Previously, the synthetic anonymous user only
existed in memory (attached by the middleware), but any DB operation
referencing userId "anonymous" would violate foreign key constraints.
Also adds 25 new tests covering:
- Integration: ensureAnonymousUser, FK constraints, settings save,
API key and pipeline operations for anonymous mode
- Frontend: useAuth hook anonymous happy path (role, permissions,
hasPermission, session endpoint bypass)
- Frontend: settings dialog nav filtering (authRequired hides
security/people/teams/roles when auth disabled)
- Backend: session endpoint returns admin role when auth disabled
2026-05-16 12:36:06 +08:00
..
2026-05-12 23:19:20 +08:00
2026-05-09 18:02:58 +08:00
2026-05-12 23:19:20 +08:00
2026-05-12 23:19:20 +08:00
2026-05-15 21:35:02 +08:00
2026-04-24 23:50:47 +08:00
2026-05-13 15:47:28 +08:00
2026-04-29 23:47:19 +08:00
2026-05-16 12:36:06 +08:00
2026-04-22 18:10:04 +08:00
2026-05-07 19:41:30 +08:00
2026-05-14 17:42:07 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-05-09 09:02:29 +08:00
2026-05-13 10:05:42 +08:00
2026-05-08 21:10:39 +08:00
2026-05-01 19:51:47 +08:00
2026-05-09 18:02:58 +08:00
2026-05-09 18:02:58 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-08 15:18:38 +08:00
2026-05-14 17:42:07 +08:00
2026-05-01 19:51:47 +08:00
2026-05-14 17:42:07 +08:00
2026-05-09 09:02:29 +08:00
2026-05-11 17:33:51 +08:00
2026-04-26 12:03:08 +08:00
2026-05-01 19:51:47 +08:00
2026-05-11 21:57:40 +08:00
2026-05-01 19:51:47 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-04-24 18:06:29 +08:00
2026-05-14 16:59:40 +08:00
2026-05-01 19:51:47 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 13:45:08 +08:00
2026-04-22 18:10:04 +08:00
2026-05-09 18:02:58 +08:00
2026-05-12 03:58:42 +08:00
2026-05-13 11:35:33 +08:00
2026-05-15 21:35:02 +08:00
2026-05-09 19:52:11 +08:00
2026-05-15 21:35:02 +08:00
2026-05-14 17:53:40 +08:00
2026-04-26 12:03:08 +08:00
2026-05-09 19:52:11 +08:00
2026-05-09 18:02:58 +08:00
2026-05-11 22:47:10 +08:00
2026-05-09 18:02:58 +08:00
2026-05-08 16:13:34 +08:00
2026-05-08 15:17:18 +08:00
2026-05-01 19:51:47 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 19:30:37 +08:00
2026-05-09 18:02:58 +08:00
2026-04-22 18:10:04 +08:00
2026-05-01 19:51:47 +08:00
2026-04-26 12:03:08 +08:00
2026-04-22 18:10:04 +08:00
2026-05-13 10:05:42 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-07 19:41:30 +08:00
2026-04-22 18:10:04 +08:00
2026-05-01 19:51:47 +08:00
2026-05-01 19:51:47 +08:00
2026-05-09 18:02:58 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 16:59:13 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 21:33:50 +08:00
2026-05-13 21:33:50 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 09:02:29 +08:00
2026-05-12 23:19:20 +08:00
2026-03-26 01:10:51 +08:00
2026-05-14 10:46:24 +08:00
2026-05-09 18:02:58 +08:00
2026-05-13 16:18:28 +08:00
2026-05-01 19:51:47 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-14 17:42:07 +08:00
2026-05-09 18:02:58 +08:00