Fix tests
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user