From: Jean Flach Date: Thu, 10 Jan 2019 10:44:14 +0000 (+0100) Subject: Don't run UpdateObjectAuthority for Comments and Downtimes X-Git-Tag: v2.11.0-rc1~257^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aff6a5887112259d795401e907a879ce424db51;p=icinga2 Don't run UpdateObjectAuthority for Comments and Downtimes --- diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index 708ec0303..5575cba00 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -159,7 +159,13 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full return false; } - ApiListener::UpdateObjectAuthority(); + /* if (type != Comment::TypeInstance && type != Downtime::TypeInstance) + * Does not work since this would require libicinga, which has a dependency on libremote + * Would work if these libs were static. + */ + if (type->GetName() != "Comment" && type->GetName() != "Downtime") + ApiListener::UpdateObjectAuthority(); + Log(LogInformation, "ConfigObjectUtility") << "Created and activated object '" << fullName << "' of type '" << type->GetName() << "'.";