mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: fix domain_join
This commit is contained in:
1 parent
a3b1f7e640
commit
878bcbc262
3 files changed
+3
-3
No files matched your search
@@ -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,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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user