mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-21 04:49:10 +02:00
fix mdm advanced view
This commit is contained in:
@@ -222,9 +222,6 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
|
|||||||
DisableNetworks: featResp.GetDisableNetworks(),
|
DisableNetworks: featResp.GetDisableNetworks(),
|
||||||
DisableUpdateSettings: featResp.GetDisableUpdateSettings(),
|
DisableUpdateSettings: featResp.GetDisableUpdateSettings(),
|
||||||
},
|
},
|
||||||
MDM: MDMFields{
|
|
||||||
DisableAdvancedView: featResp.GetDisableAdvancedView(),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
managed := cfgResp.GetMDMManagedFields()
|
managed := cfgResp.GetMDMManagedFields()
|
||||||
if len(managed) > 0 {
|
if len(managed) > 0 {
|
||||||
@@ -238,6 +235,9 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
|
|||||||
if v.Field(i).Kind() != reflect.Bool {
|
if v.Field(i).Kind() != reflect.Bool {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if t.Field(i).Name == "DisableAdvancedView" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if _, ok := set[t.Field(i).Tag.Get("json")]; ok {
|
if _, ok := set[t.Field(i).Tag.Get("json")]; ok {
|
||||||
v.Field(i).SetBool(true)
|
v.Field(i).SetBool(true)
|
||||||
}
|
}
|
||||||
@@ -250,5 +250,6 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
|
|||||||
r.MDM.AllowServerSSH = &allowed
|
r.MDM.AllowServerSSH = &allowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
r.MDM.DisableAdvancedView = featResp.GetDisableAdvancedView()
|
||||||
return r, nil
|
return r, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user