Commit 6a8ab47d authored by Romain Courteaud's avatar Romain Courteaud

Give shadow access on accounts.

parent 15436030
...@@ -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='zope'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ 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
...@@ -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
...@@ -906,8 +906,9 @@ class TestAccountModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -906,8 +906,9 @@ class TestAccountModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.account_module module = self.portal.account_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False) ['G-COMPANY', 'zope', 'R-SHADOW-PERSON'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestAccount(TestSlapOSGroupRoleSecurityMixin): class TestAccount(TestSlapOSGroupRoleSecurityMixin):
...@@ -916,8 +917,9 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin): ...@@ -916,8 +917,9 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin):
portal_type='Account') portal_type='Account')
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 TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin): class TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin):
......
139 140
\ No newline at end of file \ No newline at end of file
account_module account_module
account_module/bank
account_module/capital
account_module/coll_vat
account_module/equipments
account_module/inventories
account_module/payable
account_module/profit_loss
account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
accounting_module accounting_module
campaign_module campaign_module
component_module component_module
......
account_module account_module
account_module/bank
account_module/capital
account_module/coll_vat
account_module/equipments
account_module/inventories
account_module/payable
account_module/profit_loss
account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
accounting_module accounting_module
campaign_module campaign_module
component_module component_module
......
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