Esempio n. 1
0
 def main_recipient(self):
     person = IPerson(self.request, None)
     if self.context.recipients is None:
         return None
     recipients = sorted(self.context.recipients, key=lambda r: r.__name__)
     if person in recipients:
         return person
     for recipient in recipients:
         if flourish.canView(recipient):
             return recipient
     return None
Esempio n. 2
0
 def main_recipient(self):
     person = IPerson(self.request, None)
     if self.context.recipients is None:
         return None
     recipients = sorted(self.context.recipients, key=lambda r: r.__name__)
     if person in recipients:
         return person
     for recipient in recipients:
         if flourish.canView(recipient):
             return recipient
     return None
Esempio n. 3
0
 def __call__(self, *args, **kw):
     if not flourish.canView(self.container):
         raise Unauthorized("No permission to view groups.")
     return flourish.page.Page.__call__(self, *args, **kw)
Esempio n. 4
0
 def __call__(self, *args, **kw):
     if not flourish.canView(self.container):
         raise Unauthorized("No permission to view groups.")
     return flourish.page.Page.__call__(self, *args, **kw)