MCPcopy Create free account
hub / github.com/Icinga/icinga2 / AddGroup

Method AddGroup

lib/icinga/user.cpp:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void User::AddGroup(const String& name)
66{
67 std::unique_lock<std::mutex> lock(m_UserMutex);
68
69 Array::Ptr groups = GetGroups();
70
71 if (groups && groups->Contains(name))
72 return;
73
74 if (!groups)
75 groups = new Array();
76
77 groups->Add(name);
78}
79
80TimePeriod::Ptr User::GetPeriod() const
81{

Callers 3

AddMemberMethod · 0.45
AddMemberMethod · 0.45
AddMemberMethod · 0.45

Calls 2

ContainsMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected