Hide member 2FA toggle when domain 2FA is not enabled#85241
Conversation
The per-member "Force two-factor authentication" toggle on the Domain Member details page was shown unconditionally, even when the domain itself does not require 2FA. This was misleading because the toggle only controls exemptions from the domain-level requirement and has no effect when there is no such requirement. Wrap the ToggleSettingOptionRow in a conditional that checks domainSettings.twoFactorAuthRequired before rendering. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
@MelvinBot mark as ready for review |
|
PR has been marked as ready for review. ✅ |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Design doc issue
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-03-14.at.4.15.26.AM.mov |
|
I think the spacing looks wrong |
mountiny
left a comment
There was a problem hiding this comment.
Based on the screenshot, it looks like there is incorrect margin/ padding now when the row is missing
mountiny
left a comment
There was a problem hiding this comment.
Cant argue with designers
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.41-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.41-4 🚀
|


Explanation of Change
The per-member "Force two-factor authentication" toggle on the Domain Member details page was displayed unconditionally — even when the domain itself does not require 2FA (
twoFactorAuthRequiredis false). This was misleading because the toggle only controls exemptions from the domain-level 2FA requirement and has no functional effect when there is no such requirement.This PR wraps the
ToggleSettingOptionRowcomponent in a conditional that checksdomainSettings?.twoFactorAuthRequiredbefore rendering. When domain-level 2FA is not enabled, the toggle is now hidden.Fixed Issues
$ #85208
PROPOSAL: #85208
Tests
Offline tests
N/A — the toggle visibility is based on locally cached Onyx data (
domainSettings.twoFactorAuthRequired), so offline behavior is unchanged.QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — conditional rendering change only
Android: mWeb Chrome
N/A — conditional rendering change only
iOS: Native
N/A — conditional rendering change only
iOS: mWeb Safari
N/A — conditional rendering change only
MacOS: Chrome / Safari
N/A — conditional rendering change only