添加PERM_NEVER & PRIV_NEVER

This commit is contained in:
undefined committed 2020-09-26 20:43:34 +08:00
1 parent 21c2bb95f0
commit e1cfe1cf4d
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -242,7 +242,7 @@ class ContestProblemHandler extends ContestHandler {
this.response.template = 'problem_detail.html';
if (contest.isDone(this.tdoc)) {
if (!this.attended) throw new ContestNotAttendedError(this.tdoc.docId);
if (!contest.isOngoing(this.tdoc)) throw new ContestNotLiveError(this.tdoc.docId);
if (contest.isNotStarted(this.tdoc)) throw new ContestNotLiveError(this.tdoc.docId);
}
if (!this.tdoc.pids.map((s) => s.toString()).includes(this.pdoc.docId.toString())) {
throw new ProblemNotFoundError(pid, this.tdoc.docId);
+1 -1
View File
@@ -128,7 +128,7 @@ class HomeworkDetailProblemHandler extends HomeworkHandler {
const attended = this.tsdoc && this.tsdoc.attend === 1;
if (!contest.isDone(this.tdoc)) {
if (!attended) throw new HomeworkNotAttendedError(tid);
if (!contest.isOngoing(this.tdoc)) throw new HomeworkNotLiveError(tid);
if (contest.isNotStarted(this.tdoc)) throw new HomeworkNotLiveError(tid);
}
if (!this.tdoc.pids.includes(pid)) throw new ProblemNotFoundError(domainId, pid, tid);
const path = [