From 99ac6e545d518aae98498fddb724800a474f96c9 Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 20 Jan 2021 13:13:20 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=97=A0=E6=9D=83=E9=99=90=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=B0=E5=BD=95=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/hydrooj/package.json | 2 +- packages/hydrooj/src/handler/record.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index fcc328aa6..1ff50e493 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.15.26", + "version": "2.15.27", "bin": "bin/hydrooj.js", "main": "dist/loader.js", "typings": "dist/loader.d.ts", diff --git a/packages/hydrooj/src/handler/record.ts b/packages/hydrooj/src/handler/record.ts index 310c000ed..d458f189f 100644 --- a/packages/hydrooj/src/handler/record.ts +++ b/packages/hydrooj/src/handler/record.ts @@ -76,7 +76,7 @@ class RecordDetailHandler extends RecordHandler { const tdoc = await contest.get(domainId, rdoc.contest.tid, rdoc.contest.type); if (!this.canShowRecord(tdoc, true)) throw new PermissionError(rid); } - if (rdoc.uid !== this.user.uid && !this.user.hasPerm(PERM.PERM_READ_RECORD_CODE)) rdoc.code = null; + if (rdoc.uid !== this.user._id && !this.user.hasPerm(PERM.PERM_READ_RECORD_CODE)) rdoc.code = null; // eslint-disable-next-line prefer-const let [pdoc, udoc] = await Promise.all([ problem.get(domainId, rdoc.pid),