From 63ace13b113f8569629ba3442a5dbcbd16e24013 Mon Sep 17 00:00:00 2001 From: Gabriel Hernandez Date: Fri, 20 Jun 2025 17:05:16 +0100 Subject: [PATCH] Fix issue where you cant delete a bootstrap package (#30146) Fixes [#30059](https://github.com/fleetdm/fleet/issues/30059) Fixes an issue where you couldn't delete a bootstrap package. The issue was an unused json struct tag for DryRun on the `deleteBootstrapPackageRequest` struct. I also updated the UI to use the current endpoint to delete a bootstrap package - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. - [x] Manual QA for all new/changed functionality --- changes/issue-30059-fix-no-delete-bootstrap | 1 + frontend/utilities/endpoints.ts | 2 +- server/service/apple_mdm.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/issue-30059-fix-no-delete-bootstrap diff --git a/changes/issue-30059-fix-no-delete-bootstrap b/changes/issue-30059-fix-no-delete-bootstrap new file mode 100644 index 0000000000..a8eb4c070c --- /dev/null +++ b/changes/issue-30059-fix-no-delete-bootstrap @@ -0,0 +1 @@ +- fix an issue where you could not delete a bootstrap package diff --git a/frontend/utilities/endpoints.ts b/frontend/utilities/endpoints.ts index 1efef0446d..da49cab63a 100644 --- a/frontend/utilities/endpoints.ts +++ b/frontend/utilities/endpoints.ts @@ -161,7 +161,7 @@ export default { MDM_APPLE_SETUP_ENROLLMENT_PROFILE: `/${API_VERSION}/fleet/mdm/apple/enrollment_profile`, MDM_BOOTSTRAP_PACKAGE_METADATA: (teamId: number) => `/${API_VERSION}/fleet/mdm/bootstrap/${teamId}/metadata`, - MDM_BOOTSTRAP_PACKAGE: `/${API_VERSION}/fleet/mdm/bootstrap`, + MDM_BOOTSTRAP_PACKAGE: `/${API_VERSION}/fleet/bootstrap`, MDM_BOOTSTRAP_PACKAGE_SUMMARY: `/${API_VERSION}/fleet/mdm/bootstrap/summary`, MDM_SETUP: `/${API_VERSION}/fleet/mdm/apple/setup`, MDM_EULA: (token: string) => `/${API_VERSION}/fleet/mdm/setup/eula/${token}`, diff --git a/server/service/apple_mdm.go b/server/service/apple_mdm.go index d2d0002555..a0f2aee477 100644 --- a/server/service/apple_mdm.go +++ b/server/service/apple_mdm.go @@ -2833,7 +2833,7 @@ func (svc *Service) GetMDMAppleBootstrapPackageMetadata(ctx context.Context, tea type deleteBootstrapPackageRequest struct { TeamID uint `url:"team_id"` - DryRun bool `json:"-" query:"dry_run,optional"` // if true, apply validation but do not delete + DryRun bool `query:"dry_run,optional"` // if true, apply validation but do not delete } type deleteBootstrapPackageResponse struct {