mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: don't check PERM_VIEW_SCOREBOARD for pretest
This commit is contained in:
1 parent
af1134e05a
commit
4f9a8f1580
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.29.25",
|
||||
"version": "2.29.26",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -185,7 +185,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
||||
if (tid) {
|
||||
const tdoc = await contest.get(domainId, tid, -1);
|
||||
if (!tdoc) throw new ContestNotFoundError(domainId, tid);
|
||||
if (contest.canShowScoreboard.call(this, tdoc, true)) this.tid = tid.toHexString();
|
||||
if (pretest || contest.canShowScoreboard.call(this, tdoc, true)) this.tid = tid.toHexString();
|
||||
else throw new PermissionError(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD);
|
||||
}
|
||||
if (uidOrName) {
|
||||
|
||||
Reference in new issue
Block a user