Add exposed ldap secret for bind auth

This commit is contained in:
Johannes Zellner
2022-01-05 14:35:48 +01:00
parent 38dd7e7414
commit 44a149d1d9
3 changed files with 47 additions and 2 deletions
+1
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 (typeof req.body.secret !== 'string') return next(new HttpError(400, 'secret must be a string'));
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));