diff --git a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tests.tsx b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tests.tsx index aa14172c86f8..68c7a854d960 100644 --- a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tests.tsx +++ b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tests.tsx @@ -80,4 +80,21 @@ describe("generateActions", () => { const actions = generateActions(props); expect(actions.find((a) => a.value === "uninstall")).toBeUndefined(); }); + + it("allows to install VPP apps even if scripts are disabled", () => { + const props: generateActionsProps = { + ...defaultProps, + hostScriptsEnabled: false, + app_store_app: { + app_store_id: "1", + self_service: false, + icon_url: "", + version: "", + last_install: { command_uuid: "", installed_at: "" }, + }, + }; + const actions = generateActions(props); + expect(actions.find((a) => a.value === "install")?.disabled).toBe(false); + expect(actions.find((a) => a.value === "uninstall")).toBeUndefined(); + }); }); diff --git a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx index 53256f50bffb..c6a07ce7fa18 100644 --- a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx +++ b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx @@ -94,8 +94,9 @@ export const generateActions = ({ actions.splice(indexUninstallAction, 1); actions.splice(indexInstallAction, 1); } else { - // if host's scripts are disabled, disable install/uninstall with tooltip - if (!hostScriptsEnabled) { + // if host's scripts are disabled, and this isn't a VPP app, disable + // install/uninstall with tooltip + if (!hostScriptsEnabled && !app_store_app) { actions[indexInstallAction].disabled = true; actions[indexUninstallAction].disabled = true;