From 92176253871bd63a2a407e997e7139a63b3d9030 Mon Sep 17 00:00:00 2001 From: Noah Talerman <47070608+noahtalerman@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:44:36 -0400 Subject: [PATCH 1/3] Update error message for OS updates declaration profile - In Fleet 4.48, we'll ship "" - OS updates w/ DDM will ship in 4.49 - Update error message to let user know OS updates w/ DDM are coming soon. - In the Figma wireframes here for () add designs for new error message copy. --- server/fleet/apple_mdm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fleet/apple_mdm.go b/server/fleet/apple_mdm.go index 22bd82d6d4..1ee60cb3b9 100644 --- a/server/fleet/apple_mdm.go +++ b/server/fleet/apple_mdm.go @@ -597,7 +597,7 @@ func (r *MDMAppleRawDeclaration) ValidateUserProvided() error { // Check against types we don't allow if r.Type == `com.apple.configuration.softwareupdate.enforcement.specific` { - return NewInvalidArgumentError(r.Type, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") + return NewInvalidArgumentError(r.Type, "Declaration profile can’t include OS updates settings. OS updates coming soon!") } if _, forbidden := ForbiddenDeclTypes[r.Type]; forbidden { From 85a6d6f7a4735e5fb018aee02af68511725a8961 Mon Sep 17 00:00:00 2001 From: Noah Talerman <47070608+noahtalerman@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:03:12 -0400 Subject: [PATCH 2/3] Update tests --- server/service/integration_ddm_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/integration_ddm_test.go b/server/service/integration_ddm_test.go index 67d316ea59..43a9e798ff 100644 --- a/server/service/integration_ddm_test.go +++ b/server/service/integration_ddm_test.go @@ -62,7 +62,7 @@ func (s *integrationMDMTestSuite) TestAppleDDMBatchUpload() { }}, http.StatusUnprocessableEntity) errMsg = extractServerErrorText(res.Body) - require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") + require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. OS updates coming soon!") // Types from our list of forbidden types should fail for ft := range fleet.ForbiddenDeclTypes { From 7186cd9342b756c15603c95d8c97af6c8204383b Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Mon, 1 Apr 2024 13:42:27 -0300 Subject: [PATCH 3/3] update tests --- server/service/integration_mdm_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/integration_mdm_test.go b/server/service/integration_mdm_test.go index 7e9d9e6a5f..92c1053185 100644 --- a/server/service/integration_mdm_test.go +++ b/server/service/integration_mdm_test.go @@ -10919,7 +10919,7 @@ func (s *integrationMDMTestSuite) TestBatchSetMDMProfiles() { {Name: "N4", Contents: declarationForTestWithType("D1", "com.apple.configuration.softwareupdate.enforcement.specific")}, }}, http.StatusUnprocessableEntity, "team_id", strconv.Itoa(int(tm.ID))) errMsg := extractServerErrorText(res.Body) - require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") + require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. OS updates coming soon!") // invalid JSON res = s.Do("POST", "/api/v1/fleet/mdm/profiles/batch", batchSetMDMProfilesRequest{Profiles: []fleet.MDMProfileBatchPayload{