Commit a07d1bac authored by Romain Courteaud's avatar Romain Courteaud

Migrate account module security.

parent f24f32f8
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
<item>Auditor</item> <item>Auditor</item>
<item>Author</item> <item>Author</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
...@@ -4,9 +4,4 @@ ...@@ -4,9 +4,4 @@
<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'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -4,9 +4,4 @@ ...@@ -4,9 +4,4 @@
<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'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -880,3 +880,20 @@ class TestService(TestSlapOSGroupRoleSecurityMixin): ...@@ -880,3 +880,20 @@ class TestService(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.account_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestAccount(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.account_module.newContent(
portal_type='Account')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
84 85
\ No newline at end of file \ No newline at end of file
account_module
accounting_module accounting_module
computer_model_module computer_model_module
computer_module computer_module
......
account_module
accounting_module accounting_module
computer_model_module computer_model_module
computer_module computer_module
......
Account
Account Module
Accounting Transaction Accounting Transaction
Accounting Transaction Module Accounting Transaction Module
Assignment Assignment
......
Account
Account Module
Accounting Transaction Accounting Transaction
Accounting Transaction Module Accounting Transaction Module
Assignment Assignment
......
561 562
\ No newline at end of file \ No newline at end of file
account_module
account_module/bank account_module/bank
account_module/capital account_module/capital
account_module/coll_vat account_module/coll_vat
......
account_module
account_module/bank account_module/bank
account_module/capital account_module/capital
account_module/coll_vat account_module/coll_vat
......
Account
Account Module
Accounting Period Accounting Period
Acknowledgement Acknowledgement
Bank Account Bank Account
......
Account
Account Module
Accounting Period Accounting Period
Acknowledgement Acknowledgement
Bank Account Bank Account
......
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