Skip to content

Commit

Permalink
HRMNY-16195 avoid disabling all admins
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergonzalez committed Jan 23, 2025
1 parent 46422eb commit d4b650f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/apps/admin-ui/src/user/EditUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ const EditUserForm = ({
</DropdownItem>,
]),
]}
onToggle={(value) => save({ ...user, enabled: value })}
onToggle={(value) => {
if (user.username?.toLowerCase() != "default") {
save({ ...user, enabled: value });
}
}}
isEnabled={user.enabled}
/>
)}
Expand Down

1 comment on commit d4b650f

@saisantosh-revvity
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olivergonzalez can you disable the toggle along with not allowing the save?

Please sign in to comment.