mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: bug fixes
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -189,7 +189,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 && pdoc && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
} else if (pdoc && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
if (!canViewCode) {
|
||||
rdoc.code = '';
|
||||
|
||||
Reference in new issue
Block a user