mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add fallback for unknown user
This commit is contained in:
1 parent
58ab74fcfc
commit
a8675a45c5
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.15.1",
|
"version": "3.15.2",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export class User {
|
|||||||
this.priv = udoc.priv;
|
this.priv = udoc.priv;
|
||||||
this.regat = udoc.regat;
|
this.regat = udoc.regat;
|
||||||
this.loginat = udoc.loginat;
|
this.loginat = udoc.loginat;
|
||||||
this.perm = dudoc.perm;
|
this.perm = dudoc.perm || 0n; // This is a fallback for unknown user
|
||||||
this.scope = typeof scope === 'string' ? BigInt(scope) : scope;
|
this.scope = typeof scope === 'string' ? BigInt(scope) : scope;
|
||||||
this.role = dudoc.role || 'default';
|
this.role = dudoc.role || 'default';
|
||||||
this.tfa = !!udoc.tfa;
|
this.tfa = !!udoc.tfa;
|
||||||
|
|||||||
Reference in new issue
Block a user