Skip to content

Commit a83ee1d

Browse files
CopilotBornToBeRoot
andcommitted
Add Docusaurus documentation for system-wide policies and remove old docs
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
1 parent 84434ef commit a83ee1d

File tree

5 files changed

+148
-56
lines changed

5 files changed

+148
-56
lines changed

Documentation/config/README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

Documentation/config/config.json.example

Lines changed: 0 additions & 3 deletions
This file was deleted.

Website/docs/changelog/next-release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Release date: **xx.xx.2025**
4545

4646
- New language Ukrainian (`uk-UA`) has been added. Thanks to [@vadickkt](https://github.com/vadickkt) [#3240](https://github.com/BornToBeRoot/NETworkManager/pull/3240)
4747
- Migrated all dialogs to child windows for improved usability and accessibility. [#3271](https://github.com/BornToBeRoot/NETworkManager/pull/3271)
48+
- System-wide policies can now be configured via a `config.json` file in the application directory to control settings for all users. Currently supports controlling the "Check for updates at startup" setting. This is useful for enterprise deployments where administrators need centralized control over update behavior. See [System-Wide Policies](../system-wide-policies.md) documentation for more information. [#PRLINK](https://github.com/BornToBeRoot/NETworkManager/pull/PRLINK)
4849

4950
**DNS Lookup**
5051

Website/docs/settings/update.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Check for new program versions on GitHub when the application is launched.
1212

1313
**Default:** `Enabled`
1414

15+
:::info System-Wide Policy
16+
17+
This setting can be controlled by administrators using a system-wide policy. See [System-Wide Policies](../system-wide-policies.md) for more information on how to configure the `Update_CheckForUpdatesAtStartup` policy.
18+
19+
:::
20+
1521
:::note
1622

1723
The URL `https://api.github.com/` must be reachable to check for updates.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
5+
# System-Wide Policies
6+
7+
System-wide policies allow administrators to enforce specific settings for all users on a machine. These policies override user-specific settings and provide centralized control over application behavior in enterprise environments.
8+
9+
## Overview
10+
11+
Policies are defined in a `config.json` file placed in the application installation directory (the same folder as `NETworkManager.exe`). When this file exists, the application loads the policies at startup and applies them with precedence over user settings.
12+
13+
Users will see a visual indicator in the Settings UI when a setting is controlled by a system-wide policy, showing them the administrator-enforced value and preventing them from changing it.
14+
15+
![System-wide policy indicator](./img/system-wide-policy-indicator.png)
16+
17+
## Configuration File
18+
19+
The `config.json` file uses a simple JSON structure to define policy values. An example file (`config.json.example`) is included in the application installation directory for reference.
20+
21+
**File Location:**
22+
- **Installed version**: `C:\Program Files\NETworkManager\config.json` (or your custom installation path)
23+
- **Portable version**: Same directory as `NETworkManager.exe`
24+
25+
**File Format:**
26+
27+
```json
28+
{
29+
"Update_CheckForUpdatesAtStartup": false
30+
}
31+
```
32+
33+
:::note
34+
35+
- The file must be named exactly `config.json` (case-sensitive)
36+
- The file must contain valid JSON syntax
37+
- Changes to the file require restarting the application to take effect
38+
- If the file doesn't exist or contains invalid JSON, it will be ignored and user settings will apply
39+
40+
:::
41+
42+
## Available Policies
43+
44+
### Update_CheckForUpdatesAtStartup
45+
46+
Controls whether the application checks for updates at startup for all users.
47+
48+
**Type:** `Boolean` (true/false)
49+
50+
**Default:** Not set (users control this setting)
51+
52+
**Values:**
53+
- `true` - Force enable automatic update checks at startup for all users
54+
- `false` - Force disable automatic update checks at startup for all users
55+
- Omit the property - Allow users to control this setting themselves
56+
57+
**Example (disable updates):**
58+
59+
```json
60+
{
61+
"Update_CheckForUpdatesAtStartup": false
62+
}
63+
```
64+
65+
**Example (enable updates):**
66+
67+
```json
68+
{
69+
"Update_CheckForUpdatesAtStartup": true
70+
}
71+
```
72+
73+
:::tip Use Case
74+
75+
This is particularly useful for enterprise deployments where you want to:
76+
- Ensure consistent update check behavior across all users
77+
- Prevent users from being prompted about updates when you manage updates centrally
78+
- Enforce update checks to ensure users are notified of important security updates
79+
80+
:::
81+
82+
## User Experience
83+
84+
When a setting is controlled by a system-wide policy:
85+
86+
1. **Settings UI**: The toggle/control for the setting is disabled
87+
2. **Visual Indicator**: An orange shield icon appears next to the setting
88+
3. **Administrator Message**: The text "This setting is managed by your administrator" is displayed
89+
4. **Value Display**: The UI shows the value set by the administrator (enabled or disabled)
90+
91+
This provides clear feedback to users about which settings are under administrative control and what values are being enforced.
92+
93+
## Deployment
94+
95+
For enterprise deployments:
96+
97+
1. **Create the configuration file**:
98+
- Use the `config.json.example` as a template
99+
- Rename it to `config.json`
100+
- Set your desired policy values
101+
102+
2. **Deploy to installation directory**:
103+
- Place the `config.json` file in the same directory as `NETworkManager.exe`
104+
- For MSI installations, this is typically `C:\Program Files\NETworkManager\`
105+
- For portable installations, place it next to the executable
106+
107+
3. **Deploy methods**:
108+
- Group Policy (copy file to installation directory)
109+
- Configuration management tools (Ansible, SCCM, etc.)
110+
- MSI deployment scripts
111+
- Manual deployment for small-scale rollouts
112+
113+
4. **Verification**:
114+
- Launch the application
115+
- Navigate to Settings > Update
116+
- Verify the shield icon and administrator message appear
117+
- Confirm the toggle reflects the policy value and is disabled
118+
119+
:::warning
120+
121+
Ensure the `config.json` file has appropriate permissions so that regular users cannot modify it. On standard installations in `Program Files`, this is automatically enforced by Windows file permissions.
122+
123+
:::
124+
125+
## Troubleshooting
126+
127+
**Policy not being applied:**
128+
- Verify the file is named exactly `config.json` (not `config.json.txt`)
129+
- Check that the JSON syntax is valid (use a JSON validator)
130+
- Confirm the file is in the correct directory (same as `NETworkManager.exe`)
131+
- Restart the application after creating or modifying the file
132+
- Check the application logs for any error messages related to policy loading
133+
134+
**Policy values not showing in UI:**
135+
- Ensure the property name matches exactly: `Update_CheckForUpdatesAtStartup`
136+
- Verify the value is a boolean (`true` or `false`), not a string (`"true"` or `"false"`)
137+
- Check that there are no syntax errors in the JSON file
138+
139+
## Future Policies
140+
141+
Additional policy options will be added in future releases to provide more granular control over application behavior. If you have specific requirements for system-wide policies in your organization, please submit a feature request via the [GitHub issue tracker](https://github.com/BornToBeRoot/NETworkManager/issues/new/choose).

0 commit comments

Comments
 (0)