Fix tests

This commit is contained in:
Girish Ramakrishnan
2021-12-03 18:14:41 -08:00
parent 39807e6ba4
commit ea2b11e448
3 changed files with 4 additions and 4 deletions

View File

@@ -591,7 +591,6 @@ async function authenticateService(serviceId, dn, req, res, next) {
if (appPasswordError.reason !== BoxError.NOT_FOUND) return next(new ldap.OperationsError(appPasswordError.message));
if (!mailbox || !mailbox.active) return next(new ldap.NoSuchObjectError(dn.toString())); // user auth requires active mailbox
if (mailbox.ownerType !== mailbox.OWNERTYPE_USER && mailbox.ownerType !== mailbox.OWNERTYPE_GROUP) return next(new ldap.InvalidCredentialsError(dn.toString())); // app mailboxes don't have a real password
const [verifyError, result] = await safe(verifyMailboxPassword(mailbox, req.credentials || ''));
if (verifyError && verifyError.reason === BoxError.NOT_FOUND) return next(new ldap.NoSuchObjectError(dn.toString()));
if (verifyError && verifyError.reason === BoxError.INVALID_CREDENTIALS) return next(new ldap.InvalidCredentialsError(dn.toString()));