]> granicus.if.org Git - icinga2/commitdiff
Don't run UpdateObjectAuthority for Comments and Downtimes 6885/head
authorJean Flach <jean-marcel.flach@icinga.com>
Thu, 10 Jan 2019 10:44:14 +0000 (11:44 +0100)
committerJean Flach <jean-marcel.flach@icinga.com>
Thu, 10 Jan 2019 10:44:14 +0000 (11:44 +0100)
lib/remote/configobjectutility.cpp

index 708ec03036c60992bc9f79e6d52da71875bbaa59..5575cba004e3732d4d3f0d3376e7240f4c4200ca 100644 (file)
@@ -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() << "'.";