mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-13 10:19:07 +02:00
[client] Report the remote jobs key in the MDM UI snapshot (#7485)
* [client] Report the remote jobs key in the MDM UI snapshot Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * [client] Align the remote jobs snapshot key with the policy key The snapshot field carried the JSON tag remoteJobsAllowed while the policy key is allowRemoteJobs. GetConfigResponse.mDMManagedFields reports the raw policy keys, and applyMDMRestrictions matches them against the struct's JSON tags, so the field never turned true for a policy that set the key. Every other field in Fields already uses its policy key as the JSON tag; this was the only divergence. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
15a684248c
commit
9615d2ab16
@@ -20,6 +20,7 @@ type Fields struct {
|
||||
DisableMetricsCollection bool `json:"disableMetricsCollection"`
|
||||
SplitTunnelMode bool `json:"splitTunnelMode"`
|
||||
SplitTunnelApps bool `json:"splitTunnelApps"`
|
||||
RemoteJobsAllowed bool `json:"allowRemoteJobs"`
|
||||
DisableAdvancedView *bool `json:"disableAdvancedView"`
|
||||
}
|
||||
|
||||
@@ -60,6 +61,7 @@ func BuildRestrictions(policy *Policy) Restrictions {
|
||||
r.MDM.DisableMetricsCollection = policy.HasKey(KeyDisableMetricsCollection)
|
||||
r.MDM.SplitTunnelMode = policy.HasKey(KeySplitTunnelMode)
|
||||
r.MDM.SplitTunnelApps = policy.HasKey(KeySplitTunnelApps)
|
||||
r.MDM.RemoteJobsAllowed = policy.HasKey(KeyRemoteJobsAllowed)
|
||||
if v, ok := policy.GetBool(KeyAllowServerSSH); ok {
|
||||
r.MDM.AllowServerSSH = &v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user