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
@@ -203,7 +203,7 @@ class UserDetailHandler extends Handler {
const pdict = this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)
? await problem.getList(
domainId, rdocs.map((rdoc) => rdoc.pid),
this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN), false,
this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id, false,
)
: Object.fromEntries(rdocs.map(
(rdoc) => [rdoc.pid, { ...problem.default, pid: rdoc.pid }],