ui: 比赛广播消息时显示发送者uid

This commit is contained in:
undefined committed 2021-06-13 19:13:10 +08:00
1 parent 923d10fb84
commit 549c68cfa4
7 files changed
+35 -27

No files matched your search

+3 -1
View File
@@ -87,7 +87,9 @@ export class ProblemMainHandler extends ProblemHandler {
sort = result;
} else query.$text = { $search: q };
}
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) query.hidden = false;
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) {
query.$or = [{ hidden: false }, { owner: this.user._id }, { maintainer: this.user._id }];
}
await bus.serial('problem/list', query, this);
// eslint-disable-next-line prefer-const
let [pdocs, ppcount, pcount] = await paginate(