Rename policy detector and references to Management#6
Merged
Conversation
Unify the management-detection vocabulary with the macOS side (where MDMDetector becomes ManagementDetector), so both platforms share one model: - PolicyDetector -> ManagementDetector (file + type) - IsManagedByPolicy / IsPolicyManaged -> IsManaged - ConfigSource.Policy -> ConfigSource.Management - LoadFromPolicy -> LoadFromManagement, LoadPolicyAndUserSettings -> LoadManagementAndUserSettings - comment/section references to 'Policy' state -> 'Management' Kept as-is (Windows Group Policy platform terms, not our abstraction): the HKLM\SOFTWARE\Policies\BootstrapMate registry path and its PolicyRegistryPath constant, the ADMX/ADML templates, and 'Group Policy' / 'Intune CSP' wording that names the actual OS mechanism. Pure rename — no behavioural change.
There was a problem hiding this comment.
Pull request overview
This PR renames the Windows “Policy” management abstraction to “Management” to align terminology and naming with the macOS side, while keeping references to the actual Windows Group Policy mechanism (registry path / ADMX namespace) intact.
Changes:
- Rename
PolicyDetector→ManagementDetectorand update related method names (IsManagedByPolicy→IsManaged). - Rename config source and loaders (
ConfigSource.Policy→ConfigSource.Management,LoadPolicyAndUserSettings→LoadManagementAndUserSettings,LoadFromPolicy→LoadFromManagement). - Update UI/viewmodel wording and references from “policy” to “management” where it refers to the abstraction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/BootstrapMate.Core/ManagementDetector.cs | Renames the detector type and public API to “Management” while preserving registry-based detection behavior. |
| src/BootstrapMate.Core/ConfigManager.cs | Updates config loading/sourcing terminology and calls into ManagementDetector. |
| src/BootstrapMate.App/ViewModels/PrefsViewModel.cs | Updates viewmodel terminology and uses ManagementDetector for lock-state computation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
7
to
10
| /// <summary> | ||
| /// ViewModel for the Prefs tab. Mirrors macOS SettingsViewModel. | ||
| /// Loads from ConfigManager, saves non-policy settings via elevated CLI, shows policy lock state. | ||
| /// Loads from ConfigManager, saves non-managed settings via elevated CLI, shows management lock state. | ||
| /// </summary> |
Comment on lines
104
to
108
| /// <summary> | ||
| /// Save user-configured settings to HKLM\SOFTWARE\BootstrapMate\Settings. | ||
| /// Skips any key that is already policy-managed. | ||
| /// Requires elevation. | ||
| /// </summary> |
SaveUserSettings writes to HKCU (no elevation), but the doc comments said HKLM + 'Requires elevation' and still referred to 'policy-managed'. Update both ConfigManager and PrefsViewModel comments to match the actual behaviour: user-hive (HKCU) writes, skipping managed keys.
… reads The signature PR added VerifyPackageSignatures/ExpectedPublisher/AllowUnsigned reads in LoadFromPolicy using the 'policy' variable; this branch renamed that method to LoadFromManagement with a 'management' variable. The textual merge left the new reads referencing the old name — update them.
2c2d4cd to
ec42fb0
Compare
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
Renames the Windows "Policy" detector abstraction to "Management", unifying it with the macOS side (where
MDMDetector→ManagementDetectorin a sibling PR). One mental model across both platforms.PolicyDetector→ManagementDetector(file + type)IsManagedByPolicy/IsPolicyManaged→IsManagedConfigSource.Policy→ConfigSource.ManagementLoadFromPolicy→LoadFromManagement,LoadPolicyAndUserSettings→LoadManagementAndUserSettingsKept as-is (intentional)
These name the actual Windows Group Policy mechanism, not our abstraction — and per request the registry path stays put:
HKLM\SOFTWARE\Policies\BootstrapMateregistry path and itsPolicyRegistryPathconstantBootstrapMate.PoliciesnamespaceSafety
Pure rename, no behavioural change.⚠️ Not built locally (
dotnetunavailable on the author's machine) — relying on CI (windows-latest, dotnet 10) to compile-verify. Please confirm CI is green before merging.Notes
Based on
main, independent of the Authenticode PR #5 (which also touchesConfigManager.cs/PolicyDetector→ManagementDetector). If both land, expect a merge resolution; happy to rebase whichever merges second.