Commit 836467ed authored by Romain Courteaud's avatar Romain Courteaud

Give view access to shadow on currency.

parent c96ca99a
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<item>Auditor</item> <item>Auditor</item>
<item>Author</item> <item>Author</item>
</role> </role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'> <role id='admin'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
...@@ -4,4 +4,9 @@ ...@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -4,4 +4,9 @@ ...@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -919,8 +919,9 @@ class TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -919,8 +919,9 @@ class TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.currency_module module = self.portal.currency_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'admin'], True) ['G-COMPANY', 'admin', 'R-SHADOW-PERSON'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'admin', ['Owner']) self.assertRoles(module, 'admin', ['Owner'])
class TestCurrency(TestSlapOSGroupRoleSecurityMixin): class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
...@@ -929,8 +930,9 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin): ...@@ -929,8 +930,9 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
portal_type='Currency') portal_type='Currency')
product.updateLocalRolesOnSecurityGroups() product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False) ['G-COMPANY', self.user_id, 'R-SHADOW-PERSON'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin): class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin):
......
134 135
\ No newline at end of file \ No newline at end of file
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