mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-19 04:19:48 +01:00
Include posture in policy api response
This commit is contained in:
parent
26e931b5fc
commit
4989e1f6ca
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user