From 3bef0fec5b65a722b8895d140e40287f76047b43 Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 5 Jun 2026 12:54:49 +0200 Subject: [PATCH] [UI] Removes --disable-advanced-settings --- client/ui/client_ui.go | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/client/ui/client_ui.go b/client/ui/client_ui.go index f259ef955..d846b0d28 100644 --- a/client/ui/client_ui.go +++ b/client/ui/client_ui.go @@ -323,12 +323,6 @@ type serviceClient struct { isEnforcedUpdate bool lastNotifiedVersion string settingsEnabled bool - // advancedSettingsLocked caches the last applied MDM lock state for - // the "Advanced Settings" submenu item. Calling Enable/Disable + - // SetTitle on a systray item every 2 s drops the ClickedCh - // subscription, so we only touch the item on transition. Zero value - // (false) matches the default enabled state at AddSubMenuItem time. - advancedSettingsLocked bool profilesEnabled bool networksEnabled bool // networksMenuEnabled caches the last applied enabled-state of the @@ -1071,9 +1065,7 @@ func (s *serviceClient) onTrayReady() { // checkAndUpdateFeatures tick that observes DisableProfiles=true // is a no-op (cache zero-value == desired-false) and the menu // never gets hidden — symptom: MDM enforces the kill switch but - // the profile menu stays clickable. Same pattern caveat as - // advancedSettingsLocked, with inverted polarity because the - // existing field tracks "enabled" not "locked". + // the profile menu stays clickable. s.profilesEnabled = true systray.AddSeparator() @@ -1291,27 +1283,6 @@ func (s *serviceClient) checkAndUpdateFeatures() { // CLI is rejected at that layer. The UI deliberately keeps the // Settings menu visible so the user can still inspect current // values — read-only by virtue of the daemon refusing edits. - // Hiding the menu here would also hide the Advanced Settings - // submenu, which has its own dedicated kill switch - // (DisableAdvancedSettings); the two concerns must not be coupled. - - // MDM kill switch on the Advanced Settings submenu item. - // Only flip on transition — calling Enable/SetTitle on every 2 s - // loop tick drops the systray ClickedCh subscription on some - // platforms, breaking the click handler entirely. - if s.mAdvancedSettings != nil { - desired := features != nil && features.DisableAdvancedSettings - if desired != s.advancedSettingsLocked { - s.advancedSettingsLocked = desired - if desired { - s.mAdvancedSettings.SetTitle("Advanced Settings (MDM)") - s.mAdvancedSettings.Disable() - } else { - s.mAdvancedSettings.SetTitle("Advanced Settings") - s.mAdvancedSettings.Enable() - } - } - } // Update profile menu based on current features if s.mProfile != nil {