web/views/basecontrollers.py
branchtls-sprint
changeset 635 305da8d6aa2d
parent 603 18c6c31bbaf4
child 644 5e5b296a657e
--- a/web/views/basecontrollers.py	Mon Feb 16 20:05:55 2009 +0100
+++ b/web/views/basecontrollers.py	Mon Feb 16 20:06:18 2009 +0100
@@ -18,10 +18,10 @@
 from logilab.common.decorators import cached
 
 from cubicweb import NoSelectableObject, ValidationError, typed_eid
+from cubicweb.selectors import match_user_groups
 from cubicweb.common.selectors import yes
 from cubicweb.common.mail import format_mail
 from cubicweb.common.view import STRICT_DOCTYPE, CW_XHTML_EXTENSIONS
-
 from cubicweb.web import ExplicitLogin, Redirect, RemoteCallFailed
 from cubicweb.web.controller import Controller
 from cubicweb.web.views import vid_from_rset
@@ -462,7 +462,7 @@
 
 class SendMailController(Controller):
     id = 'sendmail'
-    require_groups = ('managers', 'users')
+    __selectors__ = (match_user_groups('managers', 'users'),)
 
     def recipients(self):
         """returns an iterator on email's recipients as entities"""