Skip to content

Commit

Permalink
Replace EUGeo with EUDB
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjiefan committed Dec 4, 2024
1 parent 499f679 commit 1eeef33
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ page 7775 "Copilot AI Capabilities"
var
EnvironmentInformation: Codeunit "Environment Information";
WithinGeo: Boolean;
WithinEuropeGeo: Boolean;
WithinEUDB: Boolean;
begin
OnRegisterCopilotCapability();

CopilotCapabilityImpl.CheckGeo(WithinGeo, WithinEuropeGeo);
CopilotCapabilityImpl.CheckGeoWithEUDB(WithinGeo, WithinEUDB);

case PrivacyNotice.GetPrivacyNoticeApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), false) of
Enum::"Privacy Notice Approval State"::Agreed:
Expand All @@ -274,17 +274,16 @@ page 7775 "Copilot AI Capabilities"
if not EnvironmentInformation.IsSaaSInfrastructure() then
CopilotCapabilityImpl.ShowCapabilitiesNotAvailableOnPremNotification();

if (WithinGeo and not WithinEuropeGeo) and (not AllowDataMovement) then
if (WithinGeo and not WithinEUDB) and (not AllowDataMovement) then
CopilotCapabilityImpl.ShowPrivacyNoticeDisagreedNotification();

CopilotCapabilityImpl.UpdateGuidedExperience(AllowDataMovement);

HasEarlyPreview := HasEarlyPreviewCapabilities();

//Todo: replace WithinEuropeGeo with WithinEUBD
WithinEUDBArea := WithinEuropeGeo;
WithinAOAIServicesInRegionArea := WithinGeo and (not WithinEuropeGeo);
WithinAOAIOutOfRegionArea := (not WithinGeo) and (not WithinEuropeGeo);
WithinEUDBArea := WithinEUDB;
WithinAOAIServicesInRegionArea := WithinGeo and (not WithinEUDB);
WithinAOAIOutOfRegionArea := (not WithinGeo) and (not WithinEUDB);
end;

local procedure HasEarlyPreviewCapabilities(): Boolean
Expand Down

0 comments on commit 1eeef33

Please sign in to comment.