def test_world_group_acl(): group = util.WorldGroup('example.com') assert group.__acl__() == [ (security.Allow, security.Everyone, 'read'), (security.Allow, 'authority:example.com', 'write'), security.DENY_ALL, ]
def public_groups(self, authority): if authority == self._authority: return [util.WorldGroup(self._authority)] else: return (self._session.query(models.Group) .filter_by(authority=authority, readable_by=group.ReadableBy.world) .all())
def test_world_group_is_public(): group = util.WorldGroup('example.com') assert group.is_public
def test_world_group_pubid(): group = util.WorldGroup('example.com') assert group.pubid == '__world__'
def test_world_group_name(): group = util.WorldGroup('example.com') assert group.name == 'Public'
def group(self): return util.WorldGroup('example.com')