summary refs log tree commit diff
path: root/src/models/User.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-24 19:32:35 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-24 19:32:35 +0200
commit1ba36abdf07dd32514d1adae1669b842dcb55a06 (patch)
tree873e816483b7a75b32860ca97f0f87c8d56c9394 /src/models/User.ts
parent1.3.1 (diff)
downloadserver-1ba36abdf07dd32514d1adae1669b842dcb55a06.tar.xz
additional token checks: user disabled/deleted or if the token was revoked
Diffstat (limited to 'src/models/User.ts')
-rw-r--r--src/models/User.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/models/User.ts b/src/models/User.ts

index 2b4f43b9..e4586088 100644 --- a/src/models/User.ts +++ b/src/models/User.ts
@@ -27,6 +27,8 @@ export interface User { mfa_enabled: boolean; // if multi factor authentication is enabled created_at: Date; // registration date verified: boolean; // if the user is offically verified + disabled: boolean; // if the account is disabled + deleted: boolean; // if the user was deleted email: string | null; // email of the user flags: bigint; // UserFlags public_flags: bigint; @@ -141,6 +143,8 @@ export const UserSchema = new Schema({ mfa_enabled: Boolean, created_at: Date, verified: Boolean, + disabled: Boolean, + deleted: Boolean, email: String, flags: { type: String, get: toBigInt }, // TODO: automatically convert Types.Long to BitField of UserFlags public_flags: { type: String, get: toBigInt },