Commit cdbc03a5 authored by Romain Courteaud's avatar Romain Courteaud

Shadow user have access to network during allocation

parent 38d3f681
...@@ -78,8 +78,9 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin): ...@@ -78,8 +78,9 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin):
def test_ComputerNetworkModuleLocalRoles(self): def test_ComputerNetworkModuleLocalRoles(self):
module = self.portal.computer_network_module module = self.portal.computer_network_module
self.assertSecurityGroup(module, ['R-MEMBER', 'R-SHADOW', self.assertSecurityGroup(module, ['R-MEMBER', 'R-SHADOW',
'ERP5TypeTestCase'], False) 'zope'], False)
self.assertRoles(module, 'R-MEMBER', ['Author', 'Auditor']) self.assertRoles(module, 'R-MEMBER', ['Author', 'Auditor'])
self.assertRoles(module, 'R-SHADOW', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
def test_ComputerNetworkModulePermissions(self): def test_ComputerNetworkModulePermissions(self):
...@@ -98,12 +99,13 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin): ...@@ -98,12 +99,13 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin):
'R-SHADOW'], False) 'R-SHADOW'], False)
self.assertRoles(network, 'ERP5TypeTestCase', ['Owner']) self.assertRoles(network, 'ERP5TypeTestCase', ['Owner'])
self.assertRoles(network, 'G-COMPANY', ['Assignor']) self.assertRoles(network, 'G-COMPANY', ['Assignor'])
self.assertRoles(network, 'R-SHADOW', ['Auditor'])
# Setting source administration give person the assignee role # Setting source administration give person the assignee role
person = self.createMemberUser() person = self.createMemberUser()
network.edit(source_administration_value=person) network.edit(source_administration_value=person)
self.assertSecurityGroup(network, self.assertSecurityGroup(network,
['ERP5TypeTestCase', 'G-COMPANY', person.getReference()], False) ['ERP5TypeTestCase', 'G-COMPANY', 'R-SHADOW', person.getReference()], False)
self.assertRoles(network, person.getReference(), ['Assignee']) self.assertRoles(network, person.getReference(), ['Assignee'])
def test_ComputerNetworkPermission(self): def test_ComputerNetworkPermission(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment