Store allowlist for exposed directory server

This commit is contained in:
Johannes Zellner
2021-11-26 10:43:50 +01:00
parent 63fe75ecd2
commit 98b28db092
2 changed files with 12 additions and 2 deletions

View File

@@ -148,6 +148,7 @@ async function setExposedLdapConfig(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.enabled !== 'boolean') return next(new HttpError(400, 'enabled must be a boolean'));
if ('allowlist' in req.body && typeof req.body.allowlist !== 'string') return next(new HttpError(400, 'allowlist must be a string'));
const [error] = await safe(settings.setExposedLdapConfig(req.body));
if (error) return next(BoxError.toHttpError(error));