You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Sources that indicate organizational management (NOT user preferences)
126
+
managed_sources= [
127
+
"GPO (Local Machine)",
128
+
"GPO (Current User)",
129
+
"Intune OMA-URI",
130
+
"System Registry (HKLM)"
120
131
]
121
132
122
133
# Scan for managed keys
123
134
forkeyinknown_keys:
124
135
res=SwitchCraftConfig.get_value_with_source(key)
125
136
ifres:
126
-
# If managed, the source will be one of the GPO or Intune ones
127
-
# But even if it's just 'System Registry', we show it if it's considered 'managed' or if we want to show all sources
128
-
# The user specifically asked to show GPO, Systemregistry, Userregistry, Intune OMA URI
129
-
managed_settings.append({
130
-
"Setting": key,
131
-
"Value": str(res["value"]),
132
-
"Source": res["source"]
133
-
})
137
+
source=res["source"]
138
+
# Only include if it's from a managed source (not user registry)
139
+
ifsourceinmanaged_sources:
140
+
# Mask secret values
141
+
value=str(res["value"])
142
+
ifkeyinsecret_keysandvalue:
143
+
value="**** hidden ****"
144
+
145
+
managed_settings.append({
146
+
"Setting": key,
147
+
"Value": value,
148
+
"Source": source
149
+
})
134
150
135
151
ifnotmanaged_settings:
136
152
returnft.Container(
137
153
content=ft.Column([
138
154
ft.Icon(ft.Icons.POLICY, size=50, color="GREEN"),
139
155
ft.Text(i18n.get("no_policies_found") or"No active policies found.", size=20),
140
-
ft.Text("Settings can be freely modified.", color="ON_SURFACE_VARIANT")
156
+
ft.Text(i18n.get("policies_no_gpo_msg") or"No GPO or Intune policies are currently enforced. Settings can be freely modified.", color="ON_SURFACE_VARIANT")
ft.Text("The following settings are enforced by your organization and cannot be changed.", color="ON_SURFACE_VARIANT"),
184
+
ft.Text(i18n.get("policies_enforced_msg") or"The following settings are enforced by your organization (GPO/Intune) and cannot be changed.", color="ON_SURFACE_VARIANT"),
0 commit comments