UI - Fix team admin ability to edit MFA (#26002)

## For #25956 

- include the `mfa_enabled` field when rendering the edit user modal
- Include `mfa_enabled` as a changeable field in the form submission
logic


![ezgif-119080b112463](https://github.com/user-attachments/assets/83baafff-d7ec-4732-a5c0-c1878965d8ce)

- [x] Changes file added for user-visible changes in `changes/`
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
jacobshandling
2025-02-03 17:03:22 -08:00
committed by GitHub
co-authored by Jacob Shandling
parent de58010510
commit ee47556053
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
- Fix a bug where team admins are unable to enable or disable MFA for a user
@@ -217,6 +217,7 @@ const enhanceUsersData = (
role: generateRole(teamId, user.teams),
teams: user.teams,
sso_enabled: user.sso_enabled,
mfa_enabled: user.mfa_enabled,
global_role: user.global_role,
actions: generateActionDropdownOptions(),
id: user.id,
@@ -32,6 +32,7 @@ const generateUpdateData = (
"name",
"email",
"sso_enabled",
"mfa_enabled",
];
return Object.keys(formData).reduce<IUserUpdateBody | any>(
(updatedAttributes, attr) => {