mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 13:56:43 +00:00
Add user aliases concept and weave LDAP into it
This commit is contained in:
@@ -20,12 +20,11 @@ export const userDALFactory = (db: TDbClient) => {
|
||||
|
||||
// USER ENCRYPTION FUNCTIONS
|
||||
// -------------------------
|
||||
const findUserEncKeyByUsername = async ({ username, orgId }: { username: string; orgId?: string }) => {
|
||||
const findUserEncKeyByUsername = async ({ username }: { username: string }) => {
|
||||
try {
|
||||
return await db(TableName.Users)
|
||||
.where({
|
||||
username,
|
||||
...(orgId ? { orgId } : { orgId: null }),
|
||||
isGhost: false
|
||||
})
|
||||
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
|
||||
|
||||
Reference in New Issue
Block a user