2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2013-02-24 08:26:10 +01:00
|
|
|
|
|
|
|
#ifndef USER_H
|
|
|
|
#define USER_H
|
|
|
|
|
2014-05-25 16:23:35 +02:00
|
|
|
#include "icinga/i2-icinga.hpp"
|
2018-01-18 13:50:38 +01:00
|
|
|
#include "icinga/user-ti.hpp"
|
2014-05-25 16:23:35 +02:00
|
|
|
#include "icinga/timeperiod.hpp"
|
|
|
|
#include "remote/messageorigin.hpp"
|
2013-03-17 20:19:29 +01:00
|
|
|
|
2013-02-24 08:26:10 +01:00
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A User.
|
|
|
|
*
|
|
|
|
* @ingroup icinga
|
|
|
|
*/
|
2018-01-04 06:11:04 +01:00
|
|
|
class User final : public ObjectImpl<User>
|
2013-02-24 08:26:10 +01:00
|
|
|
{
|
|
|
|
public:
|
2014-11-03 00:44:04 +01:00
|
|
|
DECLARE_OBJECT(User);
|
|
|
|
DECLARE_OBJECTNAME(User);
|
2013-02-24 08:26:10 +01:00
|
|
|
|
2014-05-01 23:53:08 +02:00
|
|
|
void AddGroup(const String& name);
|
|
|
|
|
2013-07-16 13:17:10 +02:00
|
|
|
/* Notifications */
|
2018-01-04 04:25:35 +01:00
|
|
|
TimePeriod::Ptr GetPeriod() const;
|
2013-03-22 14:40:55 +01:00
|
|
|
|
2018-01-11 07:08:09 +01:00
|
|
|
void ValidateStates(const Lazy<Array::Ptr>& lvalue, const ValidationUtils& utils) override;
|
|
|
|
void ValidateTypes(const Lazy<Array::Ptr>& lvalue, const ValidationUtils& utils) override;
|
2014-04-07 13:59:41 +02:00
|
|
|
|
2013-02-27 21:49:03 +01:00
|
|
|
protected:
|
2018-01-04 05:12:56 +01:00
|
|
|
void Stop(bool runtimeRemoved) override;
|
2013-08-20 11:06:04 +02:00
|
|
|
|
2018-01-04 05:12:56 +01:00
|
|
|
void OnConfigLoaded() override;
|
|
|
|
void OnAllConfigLoaded() override;
|
2014-05-01 23:53:08 +02:00
|
|
|
private:
|
|
|
|
mutable boost::mutex m_UserMutex;
|
2013-02-24 08:26:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* USER_H */
|