externalldap: when using cloudron source, disable local 2fa setup
This commit is contained in:
+1
-1
@@ -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, {}));
|
||||
|
||||
Reference in New Issue
Block a user