Justin Truong
466ef577f7
fix(vault): resolve vault_read paths under tenant workspace root
...
vault_read is a singleton wired once at boot with the global workspace
root, then joins doc.Path (stored relative to the TENANT root) onto it.
For master tenant both roots coincide, so the bug stayed invisible; every
other tenant reads ENOENT because its files live under tenants/<slug>/.
vault_search is DB-only and keeps returning the doc, so the symptom is
"search finds it, read fails" rather than an obvious missing file.
Resolve the tenant-scoped root per request via TenantLayer, which is a
no-op for master and preserves existing single-tenant behaviour. Passing
the tenant root into resolvePath also narrows the boundary check, so it
now doubles as cross-tenant isolation.
Runs originating from channels or cron may not carry the tenant slug in
context; without it TenantLayer falls back to a UUID-named directory that
does not match the slug-named one the write path creates. Add a nil-safe
TenantStore lookup for that case only.
2026-08-03 22:50:12 +07:00
..
2026-06-11 13:49:58 +01:00
2026-07-31 18:30:28 +07:00
2026-03-06 18:51:11 +07:00
2026-04-09 21:15:19 +07:00
2026-05-18 20:33:40 +07:00
2026-04-09 21:15:19 +07:00
2026-05-22 20:53:01 +07:00
2026-05-24 11:27:02 +07:00
2026-05-24 11:27:02 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-10 00:09:15 +07:00
2026-06-25 10:23:55 +07:00
2026-07-31 18:30:28 +07:00
2026-07-22 19:01:16 +07:00
2026-07-30 14:17:40 +07:00
2026-04-09 21:15:19 +07:00
2026-07-10 22:25:45 +07:00
2026-06-21 14:00:36 +07:00
2026-07-10 01:24:39 +07:00
2026-07-09 04:24:19 +07:00
2026-04-09 23:15:08 +07:00
2026-07-04 21:57:14 +07:00
2026-07-30 14:17:40 +07:00
2026-05-28 18:30:34 +07:00
2026-07-07 09:53:02 +07:00
2026-05-28 18:30:34 +07:00
2026-05-28 18:30:34 +07:00
2026-06-12 15:17:57 +07:00
2026-07-07 01:21:12 +07:00
2026-03-31 23:14:39 +07:00
2026-07-30 14:17:40 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-07-30 14:17:40 +07:00
2026-07-30 14:17:40 +07:00
2026-04-18 14:53:42 +07:00
2026-04-14 18:28:31 +07:00
2026-07-07 09:53:02 +07:00
2026-07-07 10:52:17 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-07-30 14:17:40 +07:00
2026-07-30 14:17:40 +07:00
2026-07-08 20:53:19 +07:00
2026-04-15 20:40:25 +07:00
2026-04-20 08:49:38 +07:00
2026-04-12 19:03:47 +07:00
2026-04-10 20:52:28 +07:00
2026-03-27 09:28:42 +07:00
2026-05-18 21:43:03 +07:00
2026-07-10 22:25:45 +07:00
2026-05-24 11:13:03 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 15:01:38 +07:00
2026-06-12 14:42:48 +07:00
2026-07-10 22:25:45 +07:00
2026-07-15 09:56:43 +07:00
2026-05-31 13:08:24 +07:00
2026-05-31 13:08:24 +07:00
2026-07-31 21:30:01 +07:00
2026-07-30 14:17:40 +07:00
2026-07-15 09:56:43 +07:00
2026-02-22 14:58:07 +07:00
2026-02-22 14:58:07 +07:00
2026-05-11 15:41:27 +07:00
2026-07-20 02:38:15 +08:00
2026-07-20 02:38:15 +08:00
2026-03-19 13:35:57 +07:00
2026-03-19 13:35:57 +07:00
2026-04-15 11:24:57 +07:00
2026-08-02 12:30:08 +07:00
2026-03-19 13:35:57 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-07-31 18:30:28 +07:00
2026-07-30 14:17:40 +07:00
2026-07-30 14:17:40 +07:00
2026-07-30 14:17:40 +07:00
2026-07-30 14:17:40 +07:00
2026-05-24 15:57:21 +07:00
2026-07-09 04:54:15 +07:00
2026-07-07 01:21:12 +07:00
2026-07-07 01:21:12 +07:00
2026-06-24 15:26:26 +07:00
2026-07-31 19:34:40 +07:00
2026-02-22 14:58:07 +07:00
2026-04-04 06:58:15 +07:00
2026-08-03 22:50:12 +07:00
2026-07-31 19:34:40 +07:00
2026-07-05 12:26:42 +07:00
2026-07-05 12:26:42 +07:00
2026-03-11 07:27:38 +07:00
2026-07-03 20:23:47 +07:00
2026-04-09 21:15:19 +07:00
2026-06-12 09:48:01 +07:00
2026-03-07 00:46:29 +07:00
2026-07-20 02:38:15 +08:00
2026-04-09 21:15:19 +07:00
2026-06-12 09:48:01 +07:00
2026-03-06 18:51:11 +07:00
2026-06-12 10:40:59 +07:00
2026-06-12 10:40:59 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-07-20 02:38:15 +08:00
2026-06-12 14:57:09 +07:00
2026-06-12 14:50:33 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-04-16 15:49:50 +07:00
2026-04-09 21:15:19 +07:00
2026-04-16 15:49:50 +07:00
2026-04-16 15:49:50 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-07 20:51:39 +07:00
2026-04-13 10:59:27 +07:00
2026-04-13 10:59:27 +07:00