Commit 59b2e028 authored by Romain Courteaud's avatar Romain Courteaud

Allow user to print the invoice.

parent 6c538622
...@@ -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-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -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-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
......
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='R-COMPUTER'> <role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='zope'> <role id='zope'>
......
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='R-COMPUTER'> <role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='zope'> <role id='zope'>
......
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<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>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
...@@ -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-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'> <role id='R-SHADOW-PERSON'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='admin'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
</local_roles> </local_roles>
......
...@@ -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-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
...@@ -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-MEMBER'>
<item>Auditor</item>
</role>
<role id='admin'> <role id='admin'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='ERP5TypeTestCase'>
<item>Owner</item>
</role>
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles> </local_roles>
</local_roles_item> </local_roles_item>
\ No newline at end of file
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</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>
......
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='ERP5TypeTestCase'>
<item>Owner</item>
</role>
<role id='G-COMPANY'> <role id='G-COMPANY'>
<item>Assignor</item> <item>Assignor</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles> </local_roles>
</local_roles_item> </local_roles_item>
\ No newline at end of file
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<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>
<role id='Auditor'> <role id='Auditor'>
<property id='title'>Person Shadow</property> <property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property> <multi_property id='category'>role/shadow/person</multi_property>
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<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>
<role id='Auditor'> <role id='Auditor'>
<property id='title'>Person Shadow</property> <property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property> <multi_property id='category'>role/shadow/person</multi_property>
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<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>
<role id='Auditor'> <role id='Auditor'>
<property id='title'>Person Shadow</property> <property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property> <multi_property id='category'>role/shadow/person</multi_property>
......
<type_roles>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</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>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</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>
\ No newline at end of file
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<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>
<role id='Auditor'> <role id='Auditor'>
<property id='title'>Person Shadow</property> <property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property> <multi_property id='category'>role/shadow/person</multi_property>
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
<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>
<role id='Auditor'> <role id='Auditor'>
<property id='title'>Person Shadow</property> <property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property> <multi_property id='category'>role/shadow/person</multi_property>
......
...@@ -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'>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,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'>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,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'>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,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'>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
...@@ -833,9 +833,10 @@ class TestAccountingTransactionModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -833,9 +833,10 @@ class TestAccountingTransactionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.accounting_module module = self.portal.accounting_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'zope', 'R-SHADOW-PERSON'], True) ['G-COMPANY', 'zope', 'R-SHADOW-PERSON', 'R-MEMBER'], 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, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestAccountingTransaction(TestSlapOSGroupRoleSecurityMixin): class TestAccountingTransaction(TestSlapOSGroupRoleSecurityMixin):
...@@ -925,8 +926,9 @@ class TestServiceModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -925,8 +926,9 @@ class TestServiceModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.service_module module = self.portal.service_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'admin'], True) ['G-COMPANY', 'admin', 'R-MEMBER'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'admin', ['Owner']) self.assertRoles(module, 'admin', ['Owner'])
class TestService(TestSlapOSGroupRoleSecurityMixin): class TestService(TestSlapOSGroupRoleSecurityMixin):
...@@ -935,17 +937,19 @@ class TestService(TestSlapOSGroupRoleSecurityMixin): ...@@ -935,17 +937,19 @@ class TestService(TestSlapOSGroupRoleSecurityMixin):
portal_type='Service') portal_type='Service')
product.updateLocalRolesOnSecurityGroups() product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False) ['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountModule(TestSlapOSGroupRoleSecurityMixin): 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', 'R-SHADOW-PERSON'], False) ['G-COMPANY', 'zope', 'R-SHADOW-PERSON', 'R-MEMBER'], 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, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestAccount(TestSlapOSGroupRoleSecurityMixin): class TestAccount(TestSlapOSGroupRoleSecurityMixin):
...@@ -954,18 +958,20 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin): ...@@ -954,18 +958,20 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin):
portal_type='Account') portal_type='Account')
product.updateLocalRolesOnSecurityGroups() product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON'], False) ['G-COMPANY', self.user_id, 'R-SHADOW-PERSON', 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor']) self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin): 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', 'R-SHADOW-PERSON'], True) ['G-COMPANY', 'admin', 'R-SHADOW-PERSON', 'R-MEMBER'], 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, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'admin', ['Owner']) self.assertRoles(module, 'admin', ['Owner'])
class TestCurrency(TestSlapOSGroupRoleSecurityMixin): class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
...@@ -974,17 +980,19 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin): ...@@ -974,17 +980,19 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
portal_type='Currency') portal_type='Currency')
product.updateLocalRolesOnSecurityGroups() product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON'], False) ['G-COMPANY', self.user_id, 'R-SHADOW-PERSON', 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor']) self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin): class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.sale_trade_condition_module module = self.portal.sale_trade_condition_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False) ['G-COMPANY', 'zope', 'R-MEMBER'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin): class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
...@@ -993,8 +1001,9 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin): ...@@ -993,8 +1001,9 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
portal_type='Sale Trade Condition') portal_type='Sale Trade Condition')
product.updateLocalRolesOnSecurityGroups() product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False) ['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner']) self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountingPeriod(TestSlapOSGroupRoleSecurityMixin): class TestAccountingPeriod(TestSlapOSGroupRoleSecurityMixin):
...@@ -1509,3 +1518,23 @@ class TestSecurePaymentTool(TestSlapOSGroupRoleSecurityMixin): ...@@ -1509,3 +1518,23 @@ class TestSecurePaymentTool(TestSlapOSGroupRoleSecurityMixin):
self.assertPermissionsOfRole(tool, 'Reviewer', []) self.assertPermissionsOfRole(tool, 'Reviewer', [])
self.assertAcquiredPermissions(tool, ['Add SlapOS Tools', 'Add Vifib Tools']) self.assertAcquiredPermissions(tool, ['Add SlapOS Tools', 'Add Vifib Tools'])
class TestBusinessProcessModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.business_process_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope', 'R-MEMBER'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.business_process_module.newContent(
portal_type='Business Process')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
152 153
\ No newline at end of file \ No newline at end of file
...@@ -13,6 +13,8 @@ account_module/sales ...@@ -13,6 +13,8 @@ account_module/sales
accounting_module accounting_module
business_process_module business_process_module
business_process_module/slapos_aggregated_business_process business_process_module/slapos_aggregated_business_process
business_process_module/slapos_consumption_business_process
business_process_module/slapos_subscription_business_process
campaign_module campaign_module
component_module component_module
computer_model_module computer_model_module
......
...@@ -13,6 +13,8 @@ account_module/sales ...@@ -13,6 +13,8 @@ account_module/sales
accounting_module accounting_module
business_process_module business_process_module
business_process_module/slapos_aggregated_business_process business_process_module/slapos_aggregated_business_process
business_process_module/slapos_consumption_business_process
business_process_module/slapos_subscription_business_process
campaign_module campaign_module
component_module component_module
computer_model_module computer_model_module
......
...@@ -7,6 +7,8 @@ Acknowledgement ...@@ -7,6 +7,8 @@ Acknowledgement
Assignment Assignment
Balance Transaction Balance Transaction
Bank Account Bank Account
Business Process
Business Process Module
Campaign Campaign
Campaign Module Campaign Module
Cash Register Cash Register
......
...@@ -7,6 +7,8 @@ Acknowledgement ...@@ -7,6 +7,8 @@ Acknowledgement
Assignment Assignment
Balance Transaction Balance Transaction
Bank Account Bank Account
Business Process
Business Process Module
Campaign Campaign
Campaign Module Campaign Module
Cash Register Cash Register
......
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