Add skeleton function to handle macos updates settings changes

This commit is contained in:
Martin Angers 2024-04-02 16:29:41 -04:00
parent 1e7645ea13
commit 9d63e96f87
3 changed files with 11 additions and 0 deletions

View file

@ -1055,6 +1055,15 @@ func (svc *Service) GetMDMDiskEncryptionSummary(ctx context.Context, teamID *uin
}, nil
}
func (svc *Service) mdmAppleEditedMacOSUpdates(ctx context.Context, teamID *uint, updates fleet.MacOSUpdates) error {
if updates.MinimumVersion.Value == "" {
// TODO: OS updates disabled, remove the profile
return nil
}
// TODO: OS updates enabled and modified, create or update the profile
return nil
}
func (svc *Service) mdmWindowsEnableOSUpdates(ctx context.Context, teamID *uint, updates fleet.WindowsUpdates) error {
var contents bytes.Buffer
params := windowsOSUpdatesProfileOptions{

View file

@ -76,6 +76,7 @@ func NewService(
DeleteMDMAppleBootstrapPackage: eeservice.DeleteMDMAppleBootstrapPackage,
MDMWindowsEnableOSUpdates: eeservice.mdmWindowsEnableOSUpdates,
MDMWindowsDisableOSUpdates: eeservice.mdmWindowsDisableOSUpdates,
MDMAppleEditedMacOSUpdates: eeservice.mdmAppleEditedMacOSUpdates,
})
return eeservice, nil

View file

@ -34,6 +34,7 @@ type EnterpriseOverrides struct {
DeleteMDMAppleBootstrapPackage func(ctx context.Context, teamID *uint) error
MDMWindowsEnableOSUpdates func(ctx context.Context, teamID *uint, updates WindowsUpdates) error
MDMWindowsDisableOSUpdates func(ctx context.Context, teamID *uint) error
MDMAppleEditedMacOSUpdates func(ctx context.Context, teamID *uint, updates MacOSUpdates) error
}
type OsqueryService interface {