externalldap: when using cloudron source, disable local 2fa setup

This commit is contained in:
Girish Ramakrishnan
2024-01-20 11:35:27 +01:00
parent c99c24b3bd
commit 13b9bed48b
11 changed files with 42 additions and 27 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ async function disableTwoFactorAuthentication(req, res, next) {
if (users.compareRoles(req.user.role, req.resource.role) < 0) return next(new HttpError(403, `role '${req.resource.role}' is required but user has only '${req.user.role}'`));
const [error] = await safe(users.disableTwoFactorAuthentication(req.resource.id, AuditSource.fromRequest(req)));
const [error] = await safe(users.disableTwoFactorAuthentication(req.resource, AuditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, {}));