Exemple #1
0
 def test_acl_principal(self):
     annotation = Annotation({'permissions': {
         'read': ['saoirse'],
     }})
     actual = annotation.__acl__()
     expect = [(security.Allow, 'saoirse', 'read'), security.DENY_ALL]
     assert actual == expect
Exemple #2
0
 def test_acl_deny_system_role(self):
     annotation = Annotation(
         {'permissions': {
             'read': [security.Everyone],
         }})
     actual = annotation.__acl__()
     expect = [security.DENY_ALL]
     assert actual == expect
Exemple #3
0
 def test_acl_group_world(self):
     annotation = Annotation(
         {'permissions': {
             'read': ['group:__world__'],
         }})
     actual = annotation.__acl__()
     expect = [(security.Allow, security.Everyone, 'read'),
               security.DENY_ALL]
     assert actual == expect
Exemple #4
0
 def test_acl_group(self):
     annotation = Annotation(
         {'permissions': {
             'read': ['group:lulapalooza'],
         }})
     actual = annotation.__acl__()
     expect = [(security.Allow, 'group:lulapalooza', 'read'),
               security.DENY_ALL]
     assert actual == expect
Exemple #5
0
 def test_acl_group_world(self):
     annotation = Annotation({
         'permissions': {
             'read': ['group:__world__'],
         }
     })
     actual = annotation.__acl__()
     expect = [(security.Allow, security.Everyone, 'read'), security.DENY_ALL]
     assert actual == expect
Exemple #6
0
 def test_acl_group(self):
     annotation = Annotation({
         'permissions': {
             'read': ['group:lulapalooza'],
         }
     })
     actual = annotation.__acl__()
     expect = [(security.Allow, 'group:lulapalooza', 'read'), security.DENY_ALL]
     assert actual == expect
Exemple #7
0
 def test_acl_deny_system_role(self):
     annotation = Annotation({
         'permissions': {
             'read': [security.Everyone],
         }
     })
     actual = annotation.__acl__()
     expect = [security.DENY_ALL]
     assert actual == expect
Exemple #8
0
 def test_acl_principal(self):
     annotation = Annotation({
         'permissions': {
             'read': ['saoirse'],
         }
     })
     actual = annotation.__acl__()
     expect = [(security.Allow, 'saoirse', 'read'), security.DENY_ALL]
     assert actual == expect