|
|
|
@ -170,7 +170,7 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
|
|
|
|
|
if (this.tdoc.allowViewCode && contest.isDone(this.tdoc)) {
|
|
|
|
|
canViewCode ||= tsdoc?.attend;
|
|
|
|
|
}
|
|
|
|
|
if (!tsdoc.attend && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
|
|
|
|
if (!tsdoc?.attend && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
|
|
|
|
} else if (!problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
|
|
|
|
if (!canViewCode) {
|
|
|
|
|
rdoc.code = '';
|
|
|
|
|