mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fix software name to match unique identifier for non-Mac FMAs (#27579)
This is because for Windows the installed software may show up in software inventory with an unexpected name, and we want to make sure that the FMA package shows up on the same software title as where installs of that package show. To QA: 1. Ensure macOS FMA still uploads as the app name (e.g. Figma) 2. Ensure that `unique_identifier` changes in a Windows FMA result in corresponding changes to the software title name (e.g. Figma Machine MSI).
This commit is contained in:
parent
c3c99e4aa0
commit
367efabe1a
1 changed files with 10 additions and 1 deletions
|
|
@ -115,9 +115,18 @@ func (svc *Service) AddFleetMaintainedApp(
|
|||
maintainedAppID = nil // don't set app as maintained if scripts have been modified
|
||||
}
|
||||
|
||||
// For platforms other than macOS, installer name has to match what we see in software inventory,
|
||||
// so we have the UniqueIdentifier field to indicate what that should be (independent of the name we
|
||||
// display when listing the FMA). For macOS, unique identifier is bundle name, and we use bundle
|
||||
// identifier to link installers with inventory, so we set the name to the FMA's display name instead.
|
||||
appName := app.UniqueIdentifier
|
||||
if app.Platform == "darwin" || appName == "" {
|
||||
appName = app.Name
|
||||
}
|
||||
|
||||
payload := &fleet.UploadSoftwareInstallerPayload{
|
||||
InstallerFile: installerTFR,
|
||||
Title: app.Name,
|
||||
Title: appName,
|
||||
UserID: vc.UserID(),
|
||||
TeamID: teamID,
|
||||
Version: app.Version,
|
||||
|
|
|
|||
Loading…
Reference in a new issue