Commit 0842ca52 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Accountant can view assignment as Auditor

parent 992b58ca
<type_roles>
<role id='Auditor'>
<property id='title'>Accountant Agent</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting/agent</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Accountant Manager</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting/manager</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Assignee'>
<property id='title'>Sale Agent</property>
<multi_property id='categories'>local_role_group/function</multi_property>
......
......@@ -385,18 +385,18 @@ class TestAllocationSupply(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(supply, '%s_F-PRODMAN' % project.getReference(), ['Assignor'])
self.assertRoles(supply, '%s_F-PRODAGNT' % project.getReference(), ['Assignee'])
class TestAssignment(TestSlapOSGroupRoleSecurityMixin):
def test_Assignment_Sale(self):
def test_Assignment_Sale_Accountant(self):
assignment = self.portal.person_module.newContent(
portal_type='Person').newContent(portal_type='Assignment')
self.assertSecurityGroup(assignment,
[self.user_id, 'F-SALEAGT', 'F-SALEMAN'], False)
[self.user_id, 'F-SALEAGT', 'F-SALEMAN', 'F-ACCMAN', 'F-ACCAGT'], False)
self.assertRoles(assignment, 'F-ACCMAN', ['Auditor'])
self.assertRoles(assignment, 'F-ACCAGT', ['Auditor'])
self.assertRoles(assignment, self.user_id, ['Owner'])
self.assertRoles(assignment, 'F-SALEMAN', ['Assignor'])
self.assertRoles(assignment, 'F-SALEAGT', ['Assignee'])
class TestComputeNodeModule(TestSlapOSGroupRoleSecurityMixin):
def test_ComputeNodeModule(self):
module = self.portal.compute_node_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