Call update of DDM macos updates only if premium
This commit is contained in:
@@ -556,8 +556,11 @@ func (svc *Service) ModifyAppConfig(ctx context.Context, p []byte, applyOpts fle
|
||||
// activity
|
||||
if oldAppConfig.MDM.MacOSUpdates.MinimumVersion.Value != appConfig.MDM.MacOSUpdates.MinimumVersion.Value ||
|
||||
oldAppConfig.MDM.MacOSUpdates.Deadline.Value != appConfig.MDM.MacOSUpdates.Deadline.Value {
|
||||
if err := svc.EnterpriseOverrides.MDMAppleEditedMacOSUpdates(ctx, nil, appConfig.MDM.MacOSUpdates); err != nil {
|
||||
return nil, ctxerr.Wrap(ctx, err, "update DDM profile after macOS updates change")
|
||||
if license.IsPremium() {
|
||||
// macOS updates are premium feature
|
||||
if err := svc.EnterpriseOverrides.MDMAppleEditedMacOSUpdates(ctx, nil, appConfig.MDM.MacOSUpdates); err != nil {
|
||||
return nil, ctxerr.Wrap(ctx, err, "update DDM profile after macOS updates change")
|
||||
}
|
||||
}
|
||||
|
||||
if err := svc.ds.NewActivity(
|
||||
|
||||
Reference in New Issue
Block a user