2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-10-17 19:44:31 +02:00
|
|
|
|
2014-05-25 16:23:35 +02:00
|
|
|
#include "icinga/customvarobject.hpp"
|
|
|
|
#include "base/array.hpp"
|
2016-08-16 11:02:10 +02:00
|
|
|
#impl_include "icinga/usergroup.hpp"
|
2013-10-26 09:41:45 +02:00
|
|
|
|
2015-08-04 14:47:44 +02:00
|
|
|
library icinga;
|
|
|
|
|
2013-10-26 09:41:45 +02:00
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
2014-05-12 16:45:25 +02:00
|
|
|
class User : CustomVarObject
|
2013-10-26 09:41:45 +02:00
|
|
|
{
|
|
|
|
[config] String display_name {
|
2013-10-30 09:55:00 +01:00
|
|
|
get {{{
|
|
|
|
if (m_DisplayName.IsEmpty())
|
|
|
|
return GetName();
|
|
|
|
else
|
|
|
|
return m_DisplayName;
|
|
|
|
}}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
2017-05-30 14:47:28 +02:00
|
|
|
[config, no_user_modify, required] array(name(UserGroup)) groups {
|
2014-11-08 21:17:16 +01:00
|
|
|
default {{{ return new Array(); }}}
|
2014-05-01 23:53:08 +02:00
|
|
|
};
|
2015-09-22 09:42:30 +02:00
|
|
|
[config, navigation] name(TimePeriod) period (PeriodRaw) {
|
|
|
|
navigate {{{
|
|
|
|
return TimePeriod::GetByName(GetPeriodRaw());
|
|
|
|
}}}
|
|
|
|
};
|
|
|
|
|
2016-06-21 14:46:01 +02:00
|
|
|
[config] array(Value) types;
|
2016-07-19 20:09:14 +02:00
|
|
|
[no_user_view, no_user_modify] int type_filter_real (TypeFilter);
|
2016-06-21 14:46:01 +02:00
|
|
|
[config] array(Value) states;
|
2016-07-19 20:09:14 +02:00
|
|
|
[no_user_view, no_user_modify] int state_filter_real (StateFilter);
|
2014-04-08 13:23:24 +02:00
|
|
|
|
|
|
|
[config] String email;
|
|
|
|
[config] String pager;
|
|
|
|
|
2015-08-04 14:47:44 +02:00
|
|
|
[config] bool enable_notifications {
|
2014-07-09 15:23:43 +02:00
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2014-07-10 10:57:44 +02:00
|
|
|
|
2016-06-21 11:29:12 +02:00
|
|
|
[state] Timestamp last_notification;
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
|
2013-10-30 09:55:00 +01:00
|
|
|
}
|