Also auth against mailPasswords in ldapserver.js

This commit is contained in:
Johannes Zellner
2026-02-17 19:37:38 +01:00
parent bfbcbb686d
commit cb5ccd8166
3 changed files with 27 additions and 0 deletions
+7
View File
@@ -14,6 +14,12 @@ async function get(appId, userId) {
return result[0];
}
async function getByUserId(userId) {
assert.strictEqual(typeof userId, 'string');
return await database.query('SELECT ' + MAIL_PASSWORD_FIELDS + ' FROM mailPasswords WHERE userId = ?', [ userId ]);
}
async function add(appId, userId, password) {
assert.strictEqual(typeof appId, 'string');
assert.strictEqual(typeof userId, 'string');
@@ -50,6 +56,7 @@ async function del(appId, userId) {
export default {
get,
getByUserId,
add,
list,
del