core: add maintainer field for doc (#101)

This commit is contained in:
undefined committed 2021-05-01 12:14:11 +08:00
1 parent 7bde6a922c
commit da32c79f21
24 files changed
+85 -74

No files matched your search

+1 -1
View File
@@ -99,7 +99,7 @@ class RecordDetailHandler extends RecordHandler {
if (!(pdoc && this.user.hasPerm(PERM.PERM_VIEW_PROBLEM))) {
pdoc = problem.create(pdoc?.docId || 0, pdoc?.pid || '*');
}
if (!rdoc.contest && pdoc.hidden && pdoc.owner !== this.user._id) {
if (!rdoc.contest && pdoc.hidden && !this.user.own(pdoc)) {
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) {
pdoc = problem.create(pdoc.docId, pdoc.pid);
}