mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: record: fix projection
This commit is contained in:
1 file changed
+1
-1
@@ -331,9 +331,9 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
|||||||
if (!problem.canViewBy(pdoc, this.user)) pdoc = null;
|
if (!problem.canViewBy(pdoc, this.user)) pdoc = null;
|
||||||
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
|
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
|
||||||
}
|
}
|
||||||
|
if (this.applyProjection && typeof rdoc.input !== 'string') rdoc = contest.applyProjection(tdoc, rdoc, this.user);
|
||||||
if (this.pretest) this.send({ rdoc: omit(rdoc, ['code', 'input']) });
|
if (this.pretest) this.send({ rdoc: omit(rdoc, ['code', 'input']) });
|
||||||
else {
|
else {
|
||||||
if (this.applyProjection) rdoc = contest.applyProjection(tdoc, rdoc, this.user);
|
|
||||||
this.send({
|
this.send({
|
||||||
html: await this.renderHTML('record_main_tr.html', {
|
html: await this.renderHTML('record_main_tr.html', {
|
||||||
rdoc, udoc, pdoc, tdoc, allDomain: this.allDomain,
|
rdoc, udoc, pdoc, tdoc, allDomain: this.allDomain,
|
||||||
|
|||||||
Reference in new issue
Block a user