Merge origin/main (#990, #991) into feat/admin-errors-ux; link users as id:<_id>, rebuild bundles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thomas DurieuxandClaude Opus 5.5 committed 2026-11-29 13:39:52 +00:00
commit c91e662034
47 files changed
+4699 -375

No files matched your search

+6 -3
View File
@@ -1259,9 +1259,12 @@ router.get("/users", async (req, res) => {
res.json({ query: filter, page, total, sort, results, statusCounts });
});
// Log records carry the internal user _id, never the username; accept either.
function adminUserFilter(param: string) {
return /^[a-f0-9]{24}$/.test(param) ? { $or: [{ username: param }, { _id: param }] } : { username: param };
// Log records carry the internal user _id, never the username. An _id is
// asked for explicitly as "id:<_id>": a GitHub login can also be 24 hex
// characters, and ban or promote must never hit a different account.
export function adminUserFilter(param: string) {
const id = /^id:([a-f0-9]{24})$/.exec(param);
return id ? { _id: id[1] } : { username: param };
}
router.get(