From 56ae875861ab260b80a030f50c4aff9f9dc8fff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:32:39 +0200 Subject: Adding upstream version 2.14.2. Signed-off-by: Daniel Baumann --- lib/db_ido/usergroupdbobject.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/db_ido/usergroupdbobject.cpp (limited to 'lib/db_ido/usergroupdbobject.cpp') diff --git a/lib/db_ido/usergroupdbobject.cpp b/lib/db_ido/usergroupdbobject.cpp new file mode 100644 index 0000000..23b3581 --- /dev/null +++ b/lib/db_ido/usergroupdbobject.cpp @@ -0,0 +1,30 @@ +/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ + +#include "db_ido/usergroupdbobject.hpp" +#include "db_ido/dbtype.hpp" +#include "db_ido/dbvalue.hpp" +#include "base/objectlock.hpp" +#include "base/initialize.hpp" +#include "base/configtype.hpp" + +using namespace icinga; + +REGISTER_DBTYPE(UserGroup, "contactgroup", DbObjectTypeContactGroup, "contactgroup_object_id", UserGroupDbObject); + +UserGroupDbObject::UserGroupDbObject(const DbType::Ptr& type, const String& name1, const String& name2) + : DbObject(type, name1, name2) +{ } + +Dictionary::Ptr UserGroupDbObject::GetConfigFields() const +{ + UserGroup::Ptr group = static_pointer_cast(GetObject()); + + return new Dictionary({ + { "alias", group->GetDisplayName() } + }); +} + +Dictionary::Ptr UserGroupDbObject::GetStatusFields() const +{ + return nullptr; +} -- cgit v1.2.3