Skip to content

Commit

Permalink
Platform source should not be blocked by policy check (#3725)
Browse files Browse the repository at this point in the history
  • Loading branch information
yao-msft authored Oct 3, 2023
1 parent 6dc9b2c commit a36a632
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AppInstallerCLITests/Sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,3 +1294,9 @@ TEST_CASE("RepoSources_GroupPolicy_BypassCertificatePinningForMicrosoftStore", "
REQUIRE_FALSE(source.GetDetails().CertificatePinningConfiguration.IsEmpty());
}
}

TEST_CASE("RepoSources_BuiltInDesktopFrameworkSourceAlwaysCreatable", "[sources]")
{
Source source(WellKnownSource::DesktopFrameworks);
REQUIRE(source);
}
3 changes: 3 additions & 0 deletions src/AppInstallerRepositoryCore/SourcePolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ namespace AppInstaller::Repository
return IsDefaultSourceEnabled(source, ExperimentalFeature::Feature::None, onlyExplicit, TogglePolicy::Policy::DefaultSource);
case AppInstaller::Repository::WellKnownSource::MicrosoftStore:
return IsDefaultSourceEnabled(source, ExperimentalFeature::Feature::None, onlyExplicit, TogglePolicy::Policy::MSStoreSource);
case AppInstaller::Repository::WellKnownSource::DesktopFrameworks:
// No corresponding policy available for this source.
return true;
}

return false;
Expand Down

0 comments on commit a36a632

Please sign in to comment.