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

Respect Group Policies for sources #3367

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Conversation

florelis
Copy link
Member

@florelis florelis commented Jun 21, 2023

  • Group Policy for disabling the default sources was not respected when getting the catalogs through COM. Added missing check for GP.
  • When we add a source and there is a Group Policy for allowed sources, we check the source details against the list of allowed sources. In this check we compare the types, but do a direct comparison without considering that an empty type defaults to the preindexed type. Meaning that if we had preindexed source S as allowed, we would accept winget source add --type Microsoft.PreIndexed.Package S ... but not winget source add S .... Fixed this by resolving the source type name before getting to this point.
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-cli/pull/3367&drop=dogfoodAlpha

@florelis florelis requested a review from a team as a code owner June 21, 2023 19:02
@florelis florelis merged commit ccedde1 into microsoft:master Jun 21, 2023
8 checks passed
@florelis florelis deleted the sourcePolicy branch June 22, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants