mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Add securityContext to configuration files (#38017)
For the winget DSC, Setting developer mode, installing Visual Studio 2022 & fetching and installing VS components all require elevation. Added securityContext: elevated for these resources. These configurations can now be invoked from user context, and will prompt for a single UAC to run resources that require elevation in a separate process.
This commit is contained in:
@@ -6,12 +6,16 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Enable Developer Mode
|
description: Enable Developer Mode
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
Ensure: Present
|
Ensure: Present
|
||||||
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
||||||
id: vsPackage
|
id: vsPackage
|
||||||
directives:
|
directives:
|
||||||
description: Install Visual Studio 2022 Enterprise (Any edition will work)
|
description: Install Visual Studio 2022 Enterprise (Any edition will work)
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
id: Microsoft.VisualStudio.2022.Enterprise
|
id: Microsoft.VisualStudio.2022.Enterprise
|
||||||
source: winget
|
source: winget
|
||||||
@@ -21,6 +25,8 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Install required VS workloads
|
description: Install required VS workloads
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the get and set operations
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
productId: Microsoft.VisualStudio.Product.Enterprise
|
productId: Microsoft.VisualStudio.Product.Enterprise
|
||||||
channelId: VisualStudio.17.Release
|
channelId: VisualStudio.17.Release
|
||||||
|
|||||||
@@ -6,12 +6,16 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Enable Developer Mode
|
description: Enable Developer Mode
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
Ensure: Present
|
Ensure: Present
|
||||||
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
||||||
id: vsPackage
|
id: vsPackage
|
||||||
directives:
|
directives:
|
||||||
description: Install Visual Studio 2022 Professional (Any edition will work)
|
description: Install Visual Studio 2022 Professional (Any edition will work)
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
id: Microsoft.VisualStudio.2022.Professional
|
id: Microsoft.VisualStudio.2022.Professional
|
||||||
source: winget
|
source: winget
|
||||||
@@ -21,6 +25,8 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Install required VS workloads
|
description: Install required VS workloads
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the get and set operations
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
productId: Microsoft.VisualStudio.Product.Professional
|
productId: Microsoft.VisualStudio.Product.Professional
|
||||||
channelId: VisualStudio.17.Release
|
channelId: VisualStudio.17.Release
|
||||||
|
|||||||
@@ -6,12 +6,16 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Enable Developer Mode
|
description: Enable Developer Mode
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
Ensure: Present
|
Ensure: Present
|
||||||
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
||||||
id: vsPackage
|
id: vsPackage
|
||||||
directives:
|
directives:
|
||||||
description: Install Visual Studio 2022 Community (Any edition will work)
|
description: Install Visual Studio 2022 Community (Any edition will work)
|
||||||
|
# Requires elevation for the set operation
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
id: Microsoft.VisualStudio.2022.Community
|
id: Microsoft.VisualStudio.2022.Community
|
||||||
source: winget
|
source: winget
|
||||||
@@ -21,6 +25,8 @@ properties:
|
|||||||
directives:
|
directives:
|
||||||
description: Install required VS workloads
|
description: Install required VS workloads
|
||||||
allowPrerelease: true
|
allowPrerelease: true
|
||||||
|
# Requires elevation for the get and set operations
|
||||||
|
securityContext: elevated
|
||||||
settings:
|
settings:
|
||||||
productId: Microsoft.VisualStudio.Product.Community
|
productId: Microsoft.VisualStudio.Product.Community
|
||||||
channelId: VisualStudio.17.Release
|
channelId: VisualStudio.17.Release
|
||||||
|
|||||||
Reference in New Issue
Block a user