feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -187,3 +187,24 @@ describe("getAuditLogs", () => {
|
||||
expect(result.rows[0].username).toBe("User #99");
|
||||
});
|
||||
});
|
||||
|
||||
describe("audit response privacy", () => {
|
||||
it("does not serialize legacy snapshot secrets to the client", async () => {
|
||||
selectRows.mockResolvedValue([
|
||||
{
|
||||
id: 1,
|
||||
userId: 1,
|
||||
diff: null,
|
||||
before: null,
|
||||
after: '{"name":"Alice","password":"secret-value"}',
|
||||
},
|
||||
]);
|
||||
selectCount.mockResolvedValue([{ value: 1 }]);
|
||||
selectUsers.mockResolvedValue([]);
|
||||
const result = await getAuditLogs();
|
||||
expect(JSON.stringify(result.rows)).not.toContain("secret-value");
|
||||
expect(result.rows[0].before).toBeNull();
|
||||
expect(result.rows[0].after).toBeNull();
|
||||
expect(result.rows[0].diff).toContain("Alice");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user