Add mandatory 2FA flag

part of #716
This commit is contained in:
Girish Ramakrishnan
2020-07-10 10:00:03 -07:00
parent 9ee6aa54c6
commit ed9210eede
4 changed files with 6 additions and 2 deletions

View File

@@ -246,6 +246,7 @@ function setDirectoryConfig(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.lockUserProfiles !== 'boolean') return next(new HttpError(400, 'lockUserProfiles is required'));
if (typeof req.body.mandatory2FA !== 'boolean') return next(new HttpError(400, 'mandatory2FA is required'));
settings.setDirectoryConfig(req.body, function (error) {
if (error) return next(BoxError.toHttpError(error));