mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-19 04:59:56 +00: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(),
|
||||
DisableUpdateSettings: featResp.GetDisableUpdateSettings(),
|
||||
},
|
||||
MDM: MDMFields{
|
||||
DisableAdvancedView: featResp.GetDisableAdvancedView(),
|
||||
},
|
||||
}
|
||||
managed := cfgResp.GetMDMManagedFields()
|
||||
if len(managed) > 0 {
|
||||
@@ -238,6 +235,9 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
|
||||
if v.Field(i).Kind() != reflect.Bool {
|
||||
continue
|
||||
}
|
||||
if t.Field(i).Name == "DisableAdvancedView" {
|
||||
continue
|
||||
}
|
||||
if _, ok := set[t.Field(i).Tag.Get("json")]; ok {
|
||||
v.Field(i).SetBool(true)
|
||||
}
|
||||
@@ -250,5 +250,6 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
|
||||
r.MDM.AllowServerSSH = &allowed
|
||||
}
|
||||
}
|
||||
r.MDM.DisableAdvancedView = featResp.GetDisableAdvancedView()
|
||||
return r, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user