mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 13:27:46 +00:00
Make it impossible to log in with the ghost user
This commit is contained in:
@@ -23,7 +23,7 @@ export const userDALFactory = (db: TDbClient) => {
|
|||||||
const findUserEncKeyByEmail = async (email: string) => {
|
const findUserEncKeyByEmail = async (email: string) => {
|
||||||
try {
|
try {
|
||||||
return await db(TableName.Users)
|
return await db(TableName.Users)
|
||||||
.where({ email })
|
.where({ email, ghost: false })
|
||||||
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
|
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
|
||||||
.first();
|
.first();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user