diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index 7190314cb9..b4f0a33cac 100644 --- a/.github/workflows/test-packaging.yml +++ b/.github/workflows/test-packaging.yml @@ -70,7 +70,7 @@ jobs: # - colima is pre-installed in macos-12 runners, but not in macos-13 or # macos-14 runners run: | - brew install docker colima + brew install --no-binaries docker colima colima start --mount $TMPDIR:w - name: Install Go diff --git a/ee/server/service/devices.go b/ee/server/service/devices.go index 2721676e1d..7c3b580e92 100644 --- a/ee/server/service/devices.go +++ b/ee/server/service/devices.go @@ -62,7 +62,12 @@ func (svc *Service) TriggerMigrateMDMDevice(ctx context.Context, host *fleet.Hos return ctxerr.Wrap(ctx, err, "fetching host mdm info") } - if !fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) && !fleet.IsEligibleForManualMigration(host, mdmInfo, connected) { + manualMigrationEligible, err := fleet.IsEligibleForManualMigration(host, mdmInfo, connected) + if err != nil { + return ctxerr.Wrap(ctx, err, "checking manual migration eligibility") + } + + if !fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) && !manualMigrationEligible { bre.InternalErr = ctxerr.New(ctx, "host not eligible for macOS migration") } @@ -139,7 +144,12 @@ func (svc *Service) GetFleetDesktopSummary(ctx context.Context) (fleet.DesktopSu sum.Notifications.RenewEnrollmentProfile = true } - if fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) || fleet.IsEligibleForManualMigration(host, mdmInfo, connected) { + manualMigrationEligible, err := fleet.IsEligibleForManualMigration(host, mdmInfo, connected) + if err != nil { + return sum, ctxerr.Wrap(ctx, err, "checking manual migration eligibility") + } + + if fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) || manualMigrationEligible { sum.Notifications.NeedsMDMMigration = true } diff --git a/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx b/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx index 25ff5b8f89..b7aad232de 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx @@ -2,28 +2,16 @@ import React from "react"; import Button from "components/buttons/Button"; import Modal from "components/Modal"; -import { IDeviceUserResponse } from "interfaces/host"; interface IAutoEnrollMdmModalProps { - host: IDeviceUserResponse["host"]; onCancel: () => void; } const baseClass = "auto-enroll-mdm-modal"; const AutoEnrollMdmModal = ({ - host: { platform, os_version }, onCancel, }: IAutoEnrollMdmModalProps): JSX.Element => { - let isMacOsSonomaOrLater = false; - if (platform === "darwin" && os_version.startsWith("macOS ")) { - const [major] = os_version - .replace("macOS ", "") - .split(".") - .map((s) => parseInt(s, 10)); - isMacOsSonomaOrLater = major >= 14; - } - return ( System Settings.
  • - {isMacOsSonomaOrLater ? ( - <> - In the sidebar menu, select Enroll in Remote Management, - and select Enroll. - - ) : ( - <> - In the search bar, type “Profiles.” Select Profiles, find - and double-click the [Organization name] enrollment{" "} - profile. - - )} + In the search bar, type “Profiles.” Select Profiles, find and + double-click the{" "} + + [Organization name]
    enrollment +
    {" "} + profile.
  • Enter your password, and select Enroll. diff --git a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx index 1a03eeeecf..1362b697d9 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx @@ -306,7 +306,7 @@ const DeviceUserPage = ({ const renderEnrollMdmModal = () => { return host?.dep_assigned_to_fleet ? ( - + ) : (