mail: add flag to enable/disable pop3 access per mailbox

This commit is contained in:
Girish Ramakrishnan
2021-10-08 10:15:48 -07:00
parent 9414041ba8
commit 000db4e33d
6 changed files with 30 additions and 6 deletions

View File

@@ -189,6 +189,7 @@ async function updateMailbox(req, res, next) {
if (typeof req.body.ownerId !== 'string') return next(new HttpError(400, 'ownerId must be a string'));
if (typeof req.body.ownerType !== 'string') return next(new HttpError(400, 'ownerType must be a string'));
if (typeof req.body.active !== 'boolean') return next(new HttpError(400, 'active must be a boolean'));
if (typeof req.body.enablePop3 !== 'boolean') return next(new HttpError(400, 'enablePop3 must be a boolean'));
const [error] = await safe(mail.updateMailbox(req.params.name, req.params.domain, req.body, AuditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));