From cdbc03a53ab89c989380031e0108ae8e4b2e9dd0 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 2 Oct 2012 16:24:15 +0200
Subject: [PATCH] Shadow user have access to network during allocation

---
 .../TestTemplateItem/testVifibComputerNetworkSecurity.py    | 6 ++++--
 master/bt5/vifib_erp5/bt/revision                           | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/master/bt5/vifib_erp5/TestTemplateItem/testVifibComputerNetworkSecurity.py b/master/bt5/vifib_erp5/TestTemplateItem/testVifibComputerNetworkSecurity.py
index acc24e9b4..f761db00a 100644
--- a/master/bt5/vifib_erp5/TestTemplateItem/testVifibComputerNetworkSecurity.py
+++ b/master/bt5/vifib_erp5/TestTemplateItem/testVifibComputerNetworkSecurity.py
@@ -78,8 +78,9 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin):
   def test_ComputerNetworkModuleLocalRoles(self):
     module = self.portal.computer_network_module
     self.assertSecurityGroup(module, ['R-MEMBER', 'R-SHADOW',
-        'ERP5TypeTestCase'], False)
+        'zope'], False)
     self.assertRoles(module, 'R-MEMBER', ['Author', 'Auditor'])
+    self.assertRoles(module, 'R-SHADOW', ['Auditor'])
     self.assertRoles(module, 'zope', ['Owner'])
 
   def test_ComputerNetworkModulePermissions(self):
@@ -98,12 +99,13 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin):
         'R-SHADOW'], False)
     self.assertRoles(network, 'ERP5TypeTestCase', ['Owner'])
     self.assertRoles(network, 'G-COMPANY', ['Assignor'])
+    self.assertRoles(network, 'R-SHADOW', ['Auditor'])
 
     # Setting source administration give person the assignee role
     person = self.createMemberUser()
     network.edit(source_administration_value=person)
     self.assertSecurityGroup(network,
-        ['ERP5TypeTestCase', 'G-COMPANY', person.getReference()], False)
+        ['ERP5TypeTestCase', 'G-COMPANY', 'R-SHADOW', person.getReference()], False)
     self.assertRoles(network, person.getReference(), ['Assignee'])
 
   def test_ComputerNetworkPermission(self):
diff --git a/master/bt5/vifib_erp5/bt/revision b/master/bt5/vifib_erp5/bt/revision
index 1e27e32d4..bf110299d 100644
--- a/master/bt5/vifib_erp5/bt/revision
+++ b/master/bt5/vifib_erp5/bt/revision
@@ -1 +1 @@
-478
\ No newline at end of file
+479
-- 
2.30.9