equal
deleted
inserted
replaced
6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
7 """ |
7 """ |
8 __docformat__ = "restructuredtext en" |
8 __docformat__ = "restructuredtext en" |
9 |
9 |
10 from cubicweb import UnknownEid |
10 from cubicweb import UnknownEid |
11 from cubicweb.common.appobject import ComponentMixIn |
11 from cubicweb.common.appobject import Component |
12 from cubicweb.common.view import StartupView |
12 from cubicweb.common.view import StartupView |
13 from cubicweb.common.mail import format_mail |
13 from cubicweb.common.mail import format_mail |
14 from cubicweb.server.hooksmanager import Hook |
14 from cubicweb.server.hooksmanager import Hook |
15 from cubicweb.server.hookhelper import SendMailOp |
15 from cubicweb.server.hookhelper import SendMailOp |
16 |
16 |
136 event, changedescr = change |
136 event, changedescr = change |
137 if change in index[event]: |
137 if change in index[event]: |
138 yield change |
138 yield change |
139 |
139 |
140 |
140 |
141 class SupervisionEmailView(ComponentMixIn, StartupView): |
141 class SupervisionEmailView(Component): |
142 """view implementing the email API for data changes supervision notification |
142 """view implementing the email API for data changes supervision notification |
143 """ |
143 """ |
|
144 __selectors__ = (none_rset,) |
144 id = 'supervision_notif' |
145 id = 'supervision_notif' |
145 |
146 |
146 def recipients(self): |
147 def recipients(self): |
147 return self.config['supervising-addrs'] |
148 return self.config['supervising-addrs'] |
148 |
149 |