For the same zone, call ApiListener::UpdateObjectAuthority() in icinga::Hello

after setting remote capabilities. They'll become important for teamwork in a zone.
This commit is contained in:
Alexander A. Klimov 2025-05-22 14:59:19 +02:00
parent a65f2d6b41
commit 18f810a1ea

View File

@ -1794,6 +1794,10 @@ Value ApiListener::HelloAPIHandler(const MessageOrigin::Ptr& origin, const Dicti
endpoint->SetIcingaVersion(nodeVersion);
endpoint->SetCapabilities((double)params->Get("capabilities"));
if (endpoint->GetZone() == Zone::GetLocalZone()) {
UpdateObjectAuthority();
}
if (nodeVersion == 0u) {
nodeVersion = 21200;
}