mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: upgrade simplewebauthn
This commit is contained in:
9 files changed
+20
-26
No files matched your search
@@ -127,18 +127,12 @@ export class User {
|
||||
: doc.owner === this._id || (doc.maintainer || []).includes(this._id);
|
||||
}
|
||||
|
||||
hasPerm(...perm: bigint[]) {
|
||||
for (const i in perm) {
|
||||
if ((this.perm & this.scope & perm[i]) === perm[i]) return true;
|
||||
}
|
||||
return false;
|
||||
hasPerm(...perms: bigint[]) {
|
||||
return perms.some((perm) => (this.perm & this.scope & perm) === perm);
|
||||
}
|
||||
|
||||
hasPriv(...priv: number[]) {
|
||||
for (const i in priv) {
|
||||
if ((this.priv & priv[i]) === priv[i]) return true;
|
||||
}
|
||||
return false;
|
||||
hasPriv(...privs: number[]) {
|
||||
return privs.some((priv) => (this.priv & priv) === priv);
|
||||
}
|
||||
|
||||
async checkPassword(password: string) {
|
||||
|
||||
Reference in new issue
Block a user