From 6d2f4986258abb73d28cae93245f33d6efb800d6 Mon Sep 17 00:00:00 2001 From: melpike Date: Wed, 1 Jul 2026 14:24:14 -0600 Subject: [PATCH 1/2] Apple MDM: require server URL confirmation before turning off Adds a text input to the "Turn off MDM" confirmation modal that requires the admin to type the Fleet server URL before the Turn off button becomes enabled. Prevents accidental MDM deactivation on the wrong Fleet instance. Closes #42073 --- .../MdmSettings/AppleMdmPage/AppleMdmPage.tsx | 1 + .../TurnOffAppleMdmModal.tsx | 27 ++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/AppleMdmPage.tsx b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/AppleMdmPage.tsx index cd19eaea347..688b4eee74d 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/AppleMdmPage.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/AppleMdmPage.tsx @@ -133,6 +133,7 @@ const AppleMdmPage = ({ router }: { router: InjectedRouter }) => { )} {showTurnOffMdmModal && ( diff --git a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx index cf83d11ea45..bc4ae68861c 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx @@ -1,21 +1,24 @@ import React, { useCallback, useState } from "react"; import Button from "components/buttons/Button"; - +import InputField from "components/forms/fields/InputField"; import Modal from "components/Modal"; -const baseClass = "modal turn-off-apple-mdm-modal"; +const baseClass = "turn-off-apple-mdm-modal"; interface ITurnOffAppleMdmModalProps { + serverUrl: string; onCancel: () => void; onConfirm: () => void; } const TurnOffAppleMdmModal = ({ + serverUrl, onConfirm, onCancel, }: ITurnOffAppleMdmModalProps): JSX.Element => { const [isDeleting, setIsDeleting] = useState(false); + const [enteredUrl, setEnteredUrl] = useState(""); const onClickConfirm = useCallback(() => { setIsDeleting(true); @@ -25,16 +28,28 @@ const TurnOffAppleMdmModal = ({ return (
- If you want to use MDM features again, you'll have to upload a new - APNs certificate and all end users will have to turn MDM off and back - on. +

+ If you want to use MDM features again, you'll have to upload a + new APNs certificate and all end users will have to turn MDM off and + back on. +

+

+ To confirm, enter your Fleet URL: {serverUrl} +

+ setEnteredUrl(val)} + />
From 679ce1223696833905c8603b27e465e4caba2d1d Mon Sep 17 00:00:00 2001 From: melpike Date: Wed, 1 Jul 2026 14:31:03 -0600 Subject: [PATCH 2/2] Restore 'modal' class in TurnOffAppleMdmModal baseClass --- .../modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx index bc4ae68861c..ea9c233f85b 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleMdmPage/components/modals/TurnOffAppleMdmModal/TurnOffAppleMdmModal.tsx @@ -4,7 +4,8 @@ import Button from "components/buttons/Button"; import InputField from "components/forms/fields/InputField"; import Modal from "components/Modal"; -const baseClass = "turn-off-apple-mdm-modal"; +const baseClass = "modal turn-off-apple-mdm-modal"; +const bemClass = "turn-off-apple-mdm-modal"; interface ITurnOffAppleMdmModalProps { serverUrl: string; @@ -38,7 +39,7 @@ const TurnOffAppleMdmModal = ({

setEnteredUrl(val)}