fix(vacation): scope preview requests to owned resources

This commit is contained in:
2026-03-30 12:07:26 +02:00
parent 6a6e98b5f7
commit c7434c968e
4 changed files with 180 additions and 0 deletions
@@ -128,6 +128,7 @@ function createVacationDb(overrides: Record<string, unknown> = {}) {
findMany: vi.fn().mockResolvedValue([{ id: "mgr_1" }, { id: "admin_1" }]),
},
resource: {
findFirst: vi.fn().mockResolvedValue({ id: "res_1" }),
findUnique: vi.fn().mockImplementation(async (args?: { select?: Record<string, unknown> }) => {
const select = args?.select ?? {};
return {