From ca649fe4be7d1129749a7b2004641ef87fb7515b Mon Sep 17 00:00:00 2001 From: AmirMS <104940545+AmelBawa-msft@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:52:43 -0700 Subject: [PATCH] Renaming --- doc/admx/DesktopAppInstaller.admx | 14 +++++++------- doc/admx/en-US/DesktopAppInstaller.adml | 14 +++++++------- .../Workflows/UriValidationFlow.cpp | 8 ++++---- src/AppInstallerCLITests/TestSettings.h | 4 ++-- src/AppInstallerSharedLib/GroupPolicy.cpp | 8 ++++---- .../Public/winget/GroupPolicy.h | 4 ++-- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/admx/DesktopAppInstaller.admx b/doc/admx/DesktopAppInstaller.admx index bd7bd2bd4d..fce3451700 100644 --- a/doc/admx/DesktopAppInstaller.admx +++ b/doc/admx/DesktopAppInstaller.admx @@ -183,7 +183,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -227,7 +227,7 @@ - + @@ -239,7 +239,7 @@ - + @@ -251,7 +251,7 @@ - + diff --git a/doc/admx/en-US/DesktopAppInstaller.adml b/doc/admx/en-US/DesktopAppInstaller.adml index 5d1d7e391c..ea2913d65a 100644 --- a/doc/admx/en-US/DesktopAppInstaller.adml +++ b/doc/admx/en-US/DesktopAppInstaller.adml @@ -122,12 +122,10 @@ If you disable this setting, users will not be able to use the Windows Package M If you disable or do not configure this setting, no proxy will be used by default. If you enable this setting, the specified proxy will be used by default. - Enable App Installer Allowed Security Zones - - Enable App Installer Smart Screen Validation - - Allow - Block + Enable App Installer Allowed Zones for the Windows Package Manager + + Enable Microsoft SmartScreen checks for the Windows Package Manager + Enable App Installer Allowed Zones for MSIX Packages This policy controls whether App Installer allows installing packages originating from specific URL Zones. A package's origin is determined by its URI and whether a Mart-of-the-Web (MotW) is present. If multiple URIs are involved, all of them are considered; for example, when using a .appinstaller file that involves redirection. @@ -140,6 +138,8 @@ If you disable or do not configure this policy, users will be able to install MS If you enable or do not configure this policy, the package URI will be evaluated with Microsoft SmartScreen before installation. This check is only done for packages that come from the internet. If you disable, Microsoft SmartScreen will not be consulted before installing a package. + Allow + Block @@ -156,7 +156,7 @@ If you disable, Microsoft SmartScreen will not be consulted before installing a - + Local Machine Intranet Trusted Sites diff --git a/src/AppInstallerCLICore/Workflows/UriValidationFlow.cpp b/src/AppInstallerCLICore/Workflows/UriValidationFlow.cpp index 6b06a730bd..8310357bc5 100644 --- a/src/AppInstallerCLICore/Workflows/UriValidationFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/UriValidationFlow.cpp @@ -11,7 +11,7 @@ namespace AppInstaller::CLI::Workflow // Check if smart screen is required for a given zone. bool IsSmartScreenRequired(Settings::SecurityZoneOptions zone) { - auto isSmartScreenEnabled = Settings::GroupPolicies().IsEnabled(Settings::TogglePolicy::Policy::SmartScreenValidation); + auto isSmartScreenEnabled = Settings::GroupPolicies().IsEnabled(Settings::TogglePolicy::Policy::SmartScreenCheck); AICLI_LOG(Core, Info, << "SmartScreen validation is " << (isSmartScreenEnabled ? "enabled" : "disabled")); auto isSecurityZoneCheckRequired = zone == Settings::SecurityZoneOptions::Internet || zone == Settings::SecurityZoneOptions::UntrustedSites; @@ -83,20 +83,20 @@ namespace AppInstaller::CLI::Workflow { if (!Settings::GroupPolicies().IsEnabled(Settings::TogglePolicy::Policy::AllowedSecurityZones)) { - AICLI_LOG(Core, Info, << "AllowedSecurityZones policy is disabled"); + AICLI_LOG(Core, Info, << "WindowsPackageManagerAllowedSecurityZones policy is disabled"); return false; } auto allowedSecurityZones = Settings::GroupPolicies().GetValue(); if (!allowedSecurityZones.has_value()) { - AICLI_LOG(Core, Warning, << "AllowedSecurityZones policy is not set"); + AICLI_LOG(Core, Warning, << "WindowsPackageManagerAllowedSecurityZones policy is not set"); return false; } if (allowedSecurityZones->find(zone) == allowedSecurityZones->end()) { - AICLI_LOG(Core, Warning, << "Security zone " << zone << " was not found in the group policy AllowedSecurityZones"); + AICLI_LOG(Core, Warning, << "Security zone " << zone << " was not found in the group policy WindowsPackageManagerAllowedSecurityZones"); return false; } diff --git a/src/AppInstallerCLITests/TestSettings.h b/src/AppInstallerCLITests/TestSettings.h index ff1a46e3a5..09b40181b0 100644 --- a/src/AppInstallerCLITests/TestSettings.h +++ b/src/AppInstallerCLITests/TestSettings.h @@ -23,8 +23,8 @@ namespace TestCommon const std::wstring EnableWindowsPackageManagerCommandLineInterfaces = L"EnableWindowsPackageManagerCommandLineInterfaces"; const std::wstring ConfigurationPolicyValueName = L"EnableWindowsPackageManagerConfiguration"; const std::wstring ProxyCommandLineOptionsPolicyValueName = L"EnableWindowsPackageManagerProxyCommandLineOptions"; - const std::wstring AllowedSecurityZonesPolicyValueName = L"EnableAllowedSecurityZones"; - const std::wstring SmartScreenValidationPolicyValueName = L"EnableSmartScreenValidation"; + const std::wstring AllowedSecurityZonesPolicyValueName = L"EnableWindowsPackageManagerAllowedSecurityZones"; + const std::wstring SmartScreenValidationPolicyValueName = L"EnableWindowsPackageManagerSmartScreenCheck"; const std::wstring SourceUpdateIntervalPolicyValueName = L"SourceAutoUpdateInterval"; const std::wstring SourceUpdateIntervalPolicyOldValueName = L"SourceAutoUpdateIntervalInMinutes"; diff --git a/src/AppInstallerSharedLib/GroupPolicy.cpp b/src/AppInstallerSharedLib/GroupPolicy.cpp index 580fe3971a..3921329804 100644 --- a/src/AppInstallerSharedLib/GroupPolicy.cpp +++ b/src/AppInstallerSharedLib/GroupPolicy.cpp @@ -355,7 +355,7 @@ namespace AppInstaller::Settings CONFIGURATION_ALLOWED_ZONES_READ(UntrustedSites); #undef CONFIGURATION_ALLOWED_ZONES_READ - AICLI_LOG(Core, Warning, << "Unknown value in AllowedSecurityZones: " << entry.Name()); + AICLI_LOG(Core, Warning, << "Unknown value in WindowsPackageManagerAllowedSecurityZones: " << entry.Name()); return std::nullopt; } } @@ -393,9 +393,9 @@ namespace AppInstaller::Settings case TogglePolicy::Policy::ProxyCommandLineOptions: return TogglePolicy(policy, "EnableWindowsPackageManagerProxyCommandLineOptions"sv, String::PolicyEnableProxyCommandLineOptions); case TogglePolicy::Policy::AllowedSecurityZones: - return TogglePolicy(policy, "EnableAllowedSecurityZones"sv, String::PolicyEnableAllowedSecurityZones); - case TogglePolicy::Policy::SmartScreenValidation: - return TogglePolicy(policy, "EnableSmartScreenValidation"sv, String::PolicyEnableSmartScreenValidation); + return TogglePolicy(policy, "EnableWindowsPackageManagerAllowedSecurityZones"sv, String::PolicyEnableAllowedSecurityZones); + case TogglePolicy::Policy::SmartScreenCheck: + return TogglePolicy(policy, "EnableWindowsPackageManagerSmartScreenCheck"sv, String::PolicyEnableSmartScreenValidation); default: THROW_HR(E_UNEXPECTED); } diff --git a/src/AppInstallerSharedLib/Public/winget/GroupPolicy.h b/src/AppInstallerSharedLib/Public/winget/GroupPolicy.h index 4e9361c419..59c4a449c2 100644 --- a/src/AppInstallerSharedLib/Public/winget/GroupPolicy.h +++ b/src/AppInstallerSharedLib/Public/winget/GroupPolicy.h @@ -59,7 +59,7 @@ namespace AppInstaller::Settings Configuration, ProxyCommandLineOptions, AllowedSecurityZones, - SmartScreenValidation, + SmartScreenCheck, Max, }; @@ -181,7 +181,7 @@ namespace AppInstaller::Settings POLICY_MAPPING_LIST_SPECIALIZATION(ValuePolicy::AdditionalSources, SourceFromPolicy, "AdditionalSources"sv); POLICY_MAPPING_LIST_SPECIALIZATION(ValuePolicy::AllowedSources, SourceFromPolicy, "AllowedSources"sv); - POLICY_MAPPING_ENUM_SPECIALIZATION(ValuePolicy::AllowedSecurityZones, SecurityZoneMap_t, SecurityZoneOptions, bool, "AllowedSecurityZones"sv); + POLICY_MAPPING_ENUM_SPECIALIZATION(ValuePolicy::AllowedSecurityZones, SecurityZoneMap_t, SecurityZoneOptions, bool, "WindowsPackageManagerAllowedSecurityZones"sv); } // Representation of the policies read from the registry.