core: fix domain_join

This commit is contained in:
undefined committed 2021-04-19 12:45:30 +08:00
1 parent a3b1f7e640
commit 878bcbc262
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.5.4",
"version": "2.5.5",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.23.3",
"version": "2.23.4",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+1 -1
View File
@@ -216,7 +216,7 @@ class DomainModel {
}
static getJoinSettings(ddoc: DomainDoc, roles: string[]) {
if (!ddoc.join) return null;
if (!ddoc._join) return null;
const joinSettings = ddoc._join;
if (joinSettings.method === DomainModel.JOIN_METHOD_NONE) return null;
if (!roles.includes(joinSettings.role)) return null;