mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +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",
|
"name": "hydrooj",
|
||||||
"version": "2.29.25",
|
"version": "2.29.26",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
|||||||
if (tid) {
|
if (tid) {
|
||||||
const tdoc = await contest.get(domainId, tid, -1);
|
const tdoc = await contest.get(domainId, tid, -1);
|
||||||
if (!tdoc) throw new ContestNotFoundError(domainId, tid);
|
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);
|
else throw new PermissionError(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD);
|
||||||
}
|
}
|
||||||
if (uidOrName) {
|
if (uidOrName) {
|
||||||
|
|||||||
Reference in new issue
Block a user