Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace EUGeo with EUDB #2456

Merged
merged 19 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.CheckGeoAndEUDB(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
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ codeunit 7774 "Copilot Capability Impl"
end;

[TryFunction]
procedure CheckGeo(var WithinGeo: Boolean; var WithinEuropeGeo: Boolean)
procedure CheckGeoAndEUDB(var WithinGeo: Boolean; var WithinEUDB: Boolean)
gggdttt marked this conversation as resolved.
Show resolved Hide resolved
var
ALCopilotFunctions: DotNet ALCopilotFunctions;
begin
WithinGeo := ALCopilotFunctions.IsWithinGeo();
WithinEuropeGeo := ALCopilotFunctions.IsEuropeGeo();
WithinEUDB := ALCopilotFunctions.IsWithinEUDB();
end;

procedure UpdateGuidedExperience(AllowDataMovement: Boolean)
Expand Down
Loading