Repository navigation
Make the GUI Prefs tab read-only until unlocked as administrator - #57
Merged
Merged
Conversation
Settings now live only in HKLM\SOFTWARE\BootstrapMate\Settings. The GUI shows them read-only and offers Unlock, which relaunches the app elevated through UAC on the Prefs tab and closes the non-elevated window. Cancelling UAC leaves the tab as it was. When elevated, edits auto-save through ConfigManager.SaveMachineSettings, limited to the keys the tab shows; policy-managed keys stay locked. ConfigManager no longer reads or writes HKCU settings, and the CLI drops --save-settings-file, so no settings come from a user-writable location.
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.
What
The Prefs tab in Managed Bootstrap Install is now read-only unless the app runs elevated.
--prefs, so the new window opens on the Prefs tab, and the non-elevated window closes once the elevated one has started. Cancelling the UAC prompt leaves the window as it was, with no error dialog.HKLM\SOFTWARE\BootstrapMate\SettingsthroughConfigManager.SaveMachineSettings. The save writes only the keys the tab shows, so reporting, signature and baseline settings already in HKLM are not reset to defaults. Policy-managed keys stay locked even when elevated.Settings source
ConfigManagerno longer reads or writesHKCU\SOFTWARE\BootstrapMate\Settings. Settings come from CLI arguments, policy, HKLM machine settings, or the built-in default.--save-settings-file(settings from a JSON file).--save-settingsnow writes HKLM.Tests
PrefsElevationhelper in Core (argument parsing, edit decision, UAC-cancel detection, relaunch start info), with unit tests inPrefsElevationTests.dotnet test tests/BootstrapMate.Core.Tests: 102 passed. Solution and the App (x64) build clean.Not verified
The interactive flow (UAC prompt, accept and cancel, handoff to the elevated window, editing and saving) needs a manual test on a device.