Include posture in policy api response

This commit is contained in:
bcmmbaga 2023-12-21 15:22:37 +03:00
parent 26e931b5fc
commit 4989e1f6ca
No known key found for this signature in database
GPG Key ID: 7249A19D20613553

View File

@ -338,6 +338,20 @@ func toPolicyResponse(account *server.Account, policy *server.Policy) *api.Polic
}
ap.Rules = append(ap.Rules, rule)
}
nbVersionCheck := policy.PostureCheck.NBVersionCheck
osVersionCheck := policy.PostureCheck.OSVersionCheck
ap.PostureCheck = api.PostureCheck{
NbVersionPostureCheck: api.NBVersionPostureCheck{
Enabled: &nbVersionCheck.Enabled,
MinimumVersionAllowed: &nbVersionCheck.MinimumVersionAllowed,
},
OsVersionPostureCheck: api.OSVersionPostureCheck{
Enabled: &osVersionCheck.Enabled,
MinimumVersionAllowed: &osVersionCheck.MinimumVersionAllowed,
},
}
return ap
}