Exemplo n.º 1
0
 def test_acl_private(self, factories, group_service, links_service):
     ann = factories.Annotation(shared=False, userid='saoirse')
     res = AnnotationContext(ann, group_service, links_service)
     actual = res.__acl__()
     expect = [(security.Allow, 'saoirse', 'read'),
               (security.Allow, 'saoirse', 'admin'),
               (security.Allow, 'saoirse', 'update'),
               (security.Allow, 'saoirse', 'delete'), security.DENY_ALL]
     assert actual == expect
Exemplo n.º 2
0
 def test_acl_private(self, factories, groupfinder_service, links_service):
     ann = factories.Annotation(shared=False, userid="saoirse")
     res = AnnotationContext(ann, groupfinder_service, links_service)
     actual = res.__acl__()
     # Note NOT the ``moderate`` permission
     expect = [
         (security.Allow, "saoirse", "read"),
         (security.Allow, "saoirse", "flag"),
         (security.Allow, "saoirse", "admin"),
         (security.Allow, "saoirse", "update"),
         (security.Allow, "saoirse", "delete"),
         security.DENY_ALL,
     ]
     assert actual == expect
Exemplo n.º 3
0
 def test_acl_private(self, factories, group_service, links_service):
     ann = factories.Annotation(shared=False, userid="saoirse")
     res = AnnotationContext(ann, group_service, links_service)
     actual = res.__acl__()
     # Note NOT the ``moderate`` permission
     expect = [
         (security.Allow, "saoirse", "read"),
         (security.Allow, "saoirse", "flag"),
         (security.Allow, "saoirse", "admin"),
         (security.Allow, "saoirse", "update"),
         (security.Allow, "saoirse", "delete"),
         security.DENY_ALL,
     ]
     assert actual == expect