Problem
On the Domain Member details page, there is a per-member "Force two-factor authentication" toggle that controls whether a specific member is in the twoFactorAuthExemptEmails list. This toggle is currently shown unconditionally — even when the domain itself does not require 2FA (twoFactorAuthRequired is false).
When the domain does not have 2FA enabled, this per-member toggle is misleading: toggling it ON does not actually force the member to use 2FA. The member-level toggle only controls exemptions from the domain-level requirement, so it has no effect when there is no domain-level requirement to be exempt from.
This was confirmed in OldDot as well — the toggle exists but has no functional impact when the domain 2FA setting is off.
Related test case: #84809 (comment) (see "Enable 2FA for Specific Member" section)
Proposal
Hide the per-member "Force two-factor authentication" toggle row on the Domain Member details page when domainSettings.twoFactorAuthRequired is falsy.
The fix is in src/pages/domain/Members/DomainMemberDetailsPage.tsx — wrap the ToggleSettingOptionRow (lines 145-165) in a conditional:
{!!domainSettings?.twoFactorAuthRequired && (
<ToggleSettingOptionRow
...
/>
)}
The domainSettings object is already fetched in this component, so no additional data fetching is needed.
Issue Owner
Current Issue Owner: @ZhenjaHorbach
Issue Owner
Current Issue Owner: @war-in