Merge pull request #6885 from Icinga/fix/uoa-comment-downtime

Don't run UpdateObjectAuthority for Comments and Downtimes
This commit is contained in:
Michael Friedrich 2019-01-16 14:57:34 +01:00 committed by GitHub
commit 6d7d52387f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View 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() << "'.";