mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-30 02:29:08 +02:00
Toggle gray in/out for Advanced Settings
This commit is contained in:
@@ -1678,6 +1678,16 @@ func (s *Server) GetFeatures(ctx context.Context, msg *proto.GetFeaturesRequest)
|
||||
DisableNetworks: s.networksDisabled,
|
||||
}
|
||||
|
||||
// MDM kill switch: read the value from the active policy on the
|
||||
// in-memory Config snapshot. Returns false on an absent key, so the
|
||||
// feature flag is only "true" when the admin has explicitly pushed
|
||||
// disableAdvancedSettings=true via the platform MDM channel.
|
||||
if s.config != nil {
|
||||
if v, ok := s.config.Policy().GetBool(mdm.KeyDisableAdvancedSettings); ok {
|
||||
features.DisableAdvancedSettings = v
|
||||
}
|
||||
}
|
||||
|
||||
return features, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user