Example #1
0
 def contains(self, principal):
     from schooltool.app.browser import same  # XXX
     app = ISchoolToolApplication(None)
     super_user = app['persons'].super_user
     if self.context.person is super_user:
         person = IPerson(principal, None)
         return same(person, super_user)
     if (ManagersCrowd(self.context.person).contains(principal)
             or ClerksCrowd(self.context.person).contains(principal)):
         return True
     return (ConfigurableCrowd.contains(self, principal)
             and OwnerCrowd(self.context.person).contains(principal))
Example #2
0
 def contains(self, principal):
     from schooltool.app.browser import same # XXX
     app = ISchoolToolApplication(None)
     super_user = app['persons'].super_user
     if self.context.person is super_user:
         person = IPerson(principal, None)
         return same(person, super_user)
     if (ManagersCrowd(self.context.person).contains(principal) or
         ClerksCrowd(self.context.person).contains(principal)):
         return True
     return (ConfigurableCrowd.contains(self, principal) and
             OwnerCrowd(self.context.person).contains(principal))
Example #3
0
 def contains(self, principal):
     """Return the value of the related setting (True or False)."""
     return (ConfigurableCrowd.contains(self, principal) and
             OwnerCrowd(self.context).contains(principal))
Example #4
0
 def contains(self, principal):
     """Return the value of the related setting (True or False)."""
     return (ConfigurableCrowd.contains(self, principal)
             and OwnerCrowd(self.context).contains(principal))