core: record_list: getHidden by uid

This commit is contained in:
undefined committed 2021-06-29 19:38:18 +08:00
1 parent a33708cd21
commit 791877098b
7 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ class TrainingDetailHandler extends Handler {
const pids = training.getPids(tdoc.dag);
const [owner, pdict] = await Promise.all([
user.getById(domainId, tdoc.owner),
problem.getList(domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)),
problem.getList(domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id),
]);
const psdict = await problem.getListStatus(domainId, this.user._id, pids);
const donePids = new Set<number>();