Repository navigation
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
ranm-msft
reviewed
Nov 4, 2026
ranm-msft
left a comment
Contributor
There was a problem hiding this comment.
One ask inline: reconcile custom-content forwarding with the newly added regression test.
| void SetModulePath(Execution::Context& context, IConfigurationSetProcessorFactory const& factory) | ||
| { | ||
| // Ignore settings as the server will retrieve the effective module path from the settings file if needed. | ||
| if (!context.Args.Contains(Execution::Args::Type::ConfigurationModulePath)) |
Contributor
There was a problem hiding this comment.
This unconditional return appears inconsistent with the new ConfigurationModulePath_CustomContentForwarded test. With no module-path argument, both generated cases return here before Location is set, so REQUIRE(factory->LocationSet) cannot pass. Should this gate distinguish file-backed settings from authoritative custom content, or should the stated contract and test be revised?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description
Add a protected, per-user administrator settings file so selected settings from the ordinary, user-writable file cannot control elevated operations. The new
admin-settings.jsonuses the existing settings schema and protected storage, separate from the existing administrator capability controls.nullselects the default. Invalid protected values do not fall back to ordinary-file values; unrecoverable protected-file load failures warn and leave both files' settings unapplied.winget settings --admin,adminSettingsFilein settings export,-Adminon the user-setting PowerShell cmdlets, and target selection on the PowerShell and native DSC settings-file resources. Protected mutations require elevation; existing files can be opened without elevation. Headless creation supports provisioning without launching an editor.CreateDefault2, and tolerate malformed inherited module-path entries with diagnostics.Existing Group Policy precedence, explicit CLI/API path selections, and authoritative in-process settings content remain unchanged. This does not automatically migrate settings or copy ordinary modules into protected storage, and does not restrict every other PowerShell discovery path.
🔍 Validation
Added or updated native, managed, and PowerShell tests for source/context precedence, null and invalid values, backup recovery, policy behavior, protected storage permissions, management target selection, warnings, explicit module roots, inherited path cleanup, and deferred imports.
Microsoft Reviewers: Open in CodeFlow