]> granicus.if.org Git - icinga2/blob - lib/icinga/user.ti
Merge pull request #6727 from Icinga/feature/cluster-config-sync-stage
[icinga2] / lib / icinga / user.ti
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #include "icinga/customvarobject.hpp"
4 #include "base/array.hpp"
5 #impl_include "icinga/usergroup.hpp"
6
7 library icinga;
8
9 namespace icinga
10 {
11
12 class User : CustomVarObject
13 {
14         [config] String display_name {
15                 get {{{
16                         if (m_DisplayName.IsEmpty())
17                                 return GetName();
18                         else
19                                 return m_DisplayName;
20                 }}}
21         };
22         [config, no_user_modify, required] array(name(UserGroup)) groups {
23                 default {{{ return new Array(); }}}
24         };
25         [config, navigation] name(TimePeriod) period (PeriodRaw) {
26                 navigate {{{
27                         return TimePeriod::GetByName(GetPeriodRaw());
28                 }}}
29         };
30
31         [config] array(Value) types;
32         [no_user_view, no_user_modify] int type_filter_real (TypeFilter);
33         [config] array(Value) states;
34         [no_user_view, no_user_modify] int state_filter_real (StateFilter);
35
36         [config] String email;
37         [config] String pager;
38
39         [config] bool enable_notifications {
40                 default {{{ return true; }}}
41         };
42
43         [state] Timestamp last_notification;
44 };
45
46 }