Implement Windows MDM programmatic unenrollment (notification + orbit trigger) (#12505)

This commit is contained in:
Martin Angers
2023-06-28 09:13:37 -04:00
committed by GitHub
parent e323a3d881
commit 1db2f7646a
14 changed files with 390 additions and 171 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ func (svc *Service) TriggerMigrateMDMDevice(ctx context.Context, host *fleet.Hos
bre.InternalErr = ctxerr.New(ctx, "macOS migration not enabled")
case ac.MDM.MacOSMigration.WebhookURL == "":
bre.InternalErr = ctxerr.New(ctx, "macOS migration webhook URL not configured")
case !host.IsElegibleForDEPMigration():
case !host.IsEligibleForDEPMigration():
bre.InternalErr = ctxerr.New(ctx, "host not eligible for macOS migration")
case host.RefetchCriticalQueriesUntil != nil && host.RefetchCriticalQueriesUntil.After(svc.clock.Now()):
// the webhook has already been triggered successfully recently (within the
@@ -102,7 +102,7 @@ func (svc *Service) GetFleetDesktopSummary(ctx context.Context) (fleet.DesktopSu
sum.Notifications.RenewEnrollmentProfile = true
}
if host.IsElegibleForDEPMigration() {
if host.IsEligibleForDEPMigration() {
sum.Notifications.NeedsMDMMigration = true
}
}