core: add fallback for unknown user

This commit is contained in:
undefined committed 2022-08-01 20:02:23 +08:00
1 parent 58ab74fcfc
commit a8675a45c5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ export class User {
this.priv = udoc.priv;
this.regat = udoc.regat;
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.role = dudoc.role || 'default';
this.tfa = !!udoc.tfa;