diff --git a/frontend/pages/ManageControlsPage/SetupExperience/cards/SetupAssistant/SetupAssistant.tsx b/frontend/pages/ManageControlsPage/SetupExperience/cards/SetupAssistant/SetupAssistant.tsx index 44117f07686c..59fe7878a186 100644 --- a/frontend/pages/ManageControlsPage/SetupExperience/cards/SetupAssistant/SetupAssistant.tsx +++ b/frontend/pages/ManageControlsPage/SetupExperience/cards/SetupAssistant/SetupAssistant.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { useQuery } from "react-query"; import { IConfig } from "interfaces/config"; -import { API_NO_TEAM_ID, ITeamConfig } from "interfaces/team"; +import team, { API_NO_TEAM_ID, ITeam, ITeamConfig } from "interfaces/team"; import configAPI from "services/entities/config"; import teamsAPI, { ILoadTeamResponse } from "services/entities/teams"; @@ -45,6 +45,15 @@ const StartupAssistant = ({ currentTeamId }: ISetupAssistantProps) => { select: (res) => res.team, }); + const getReleaseDeviceSetting = () => { + if (currentTeamId === API_NO_TEAM_ID) { + return ( + globalConfig?.mdm.macos_setup.enable_release_device_manually || false + ); + } + return teamConfig?.mdm?.macos_setup.enable_release_device_manually || false; + }; + const isLoading = false; const noPackageUploaded = true; @@ -53,6 +62,8 @@ const StartupAssistant = ({ currentTeamId }: ISetupAssistantProps) => { const onDelete = () => {}; + const defaultReleaseDeviceSetting = getReleaseDeviceSetting(); + return (