fix mdm allowserverssh

This commit is contained in:
Eduard Gert
2026-06-15 13:20:16 +02:00
parent b6246e7c02
commit 90be56788a
3 changed files with 21 additions and 15 deletions
+7
View File
@@ -235,6 +235,10 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
if v.Field(i).Kind() != reflect.Bool {
continue
}
// AllowServerSSH carries the resolved value (like ManagementURL), not the is-managed flag.
if t.Field(i).Name == "AllowServerSSH" {
continue
}
if _, ok := set[t.Field(i).Tag.Get("json")]; ok {
v.Field(i).SetBool(true)
}
@@ -242,6 +246,9 @@ func (s *Settings) GetRestrictions(ctx context.Context) (Restrictions, error) {
if _, ok := set["managementURL"]; ok {
r.MDM.ManagementURL = cfgResp.GetManagementUrl()
}
if _, ok := set["allowServerSSH"]; ok {
r.MDM.AllowServerSSH = cfgResp.GetServerSSHAllowed()
}
}
r.MDM.DisableAdvancedView = featResp.GetDisableAdvancedView()
return r, nil