Add mailPassword table

This table stores email credentials for users using apps which use the
email addon
This commit is contained in:
Johannes Zellner
2026-02-17 17:22:50 +01:00
parent 135c9fb64d
commit 9bac099339
7 changed files with 174 additions and 1 deletions
+3
View File
@@ -32,6 +32,7 @@ import users from './users.js';
import groups from './groups.js';
import util from 'node:util';
import Provider from 'oidc-provider';
import mailpasswords from './mailpasswords.js';
const debug = debugModule('box:oidcserver');
@@ -535,6 +536,8 @@ async function getClaims(username/*, use, scope*/) {
const [mailboxesError, mailboxes] = await safe(mail.listMailboxesByUserId(user.id));
if (mailboxesError) return { error: mailboxesError.message };
// const [mailPasswordError, mailPassword] = await safe(mailpasswords.get())
const displayName = user.displayName || user.username || ''; // displayName can be empty and username can be null
const { firstName, lastName, middleName } = users.parseDisplayName(displayName);