add confirm dialog to update security settings

This commit is contained in:
miloschwartz
2025-10-24 17:30:39 -07:00
parent 460df46abc
commit 9ce81b34c9
4 changed files with 61 additions and 20 deletions

View File

@@ -86,20 +86,6 @@ export async function updateOrg(
parsedBody.data.passwordExpiryDays = undefined;
}
if (
req.user &&
req.user.type === UserType.Internal &&
parsedBody.data.requireTwoFactor === true &&
!req.user.twoFactorEnabled
) {
return next(
createHttpError(
HttpCode.FORBIDDEN,
"You must enable two-factor authentication for your account before enforcing it for all users"
)
);
}
const updatedOrg = await db
.update(orgs)
.set({