def test_acl_principal(self): annotation = Annotation({'permissions': { 'read': ['saoirse'], }}) actual = annotation.__acl__() expect = [(security.Allow, 'saoirse', 'read'), security.DENY_ALL] assert actual == expect
def test_acl_deny_system_role(self): annotation = Annotation( {'permissions': { 'read': [security.Everyone], }}) actual = annotation.__acl__() expect = [security.DENY_ALL] assert actual == expect
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
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
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
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
def test_acl_deny_system_role(self): annotation = Annotation({ 'permissions': { 'read': [security.Everyone], } }) actual = annotation.__acl__() expect = [security.DENY_ALL] assert actual == expect
def test_acl_principal(self): annotation = Annotation({ 'permissions': { 'read': ['saoirse'], } }) actual = annotation.__acl__() expect = [(security.Allow, 'saoirse', 'read'), security.DENY_ALL] assert actual == expect