winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Don't enable/disable admin settings if group policy prevents it

Open AmelBawa-msft opened this issue 3 years ago • 2 comments

What was done?

  • If an admin setting was disabled by a group policy, and user attempts to enable it using winget settings --enable, then report an error message.
  • Similarly, if an admin setting was enabled by group policy, and user attempts to disable it using winget settings --disable, then report an error message.

Test?

  • Added tests covering the various state combinations.
Microsoft Reviewers: Open in CodeFlow

AmelBawa-msft avatar Nov 08 '22 18:11 AmelBawa-msft

/azp run

AmelBawa-msft avatar Nov 08 '22 19:11 AmelBawa-msft

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Nov 08 '22 19:11 azure-pipelines[bot]