Skip to content

Commit

Permalink
Replace EUGeo with EUDB (#2456)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->

needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#545996](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/545996)

---------

Co-authored-by: wenjiefan <[email protected]>
  • Loading branch information
gggdttt and wenjiefan committed Dec 5, 2024
1 parent de5cab9 commit 1a927e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,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 @@ -266,15 +266,15 @@ 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);

//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 UpdateAllowDataMovement()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ codeunit 7774 "Copilot Capability Impl"
end;

[TryFunction]
procedure CheckGeo(var WithinGeo: Boolean; var WithinEuropeGeo: Boolean)
procedure CheckGeoAndEUDB(var WithinGeo: Boolean; var WithinEUDB: Boolean)
var
ALCopilotFunctions: DotNet ALCopilotFunctions;
begin
WithinGeo := ALCopilotFunctions.IsWithinGeo();
WithinEuropeGeo := ALCopilotFunctions.IsEuropeGeo();
WithinEUDB := ALCopilotFunctions.IsWithinEUDB();
end;

procedure UpdateGuidedExperience(AllowDataMovement: Boolean)
Expand Down

0 comments on commit 1a927e2

Please sign in to comment.