mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix contest attended check
This commit is contained in:
1 parent
a24fec2e7c
commit
b1e5c77a56
1 file changed
+1
-1
@@ -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 = '';
|
||||
|
||||
Reference in new issue
Block a user