Commit c19634b1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: Sale user can see Software Product

parent 37f71599
......@@ -26,4 +26,10 @@
<multi_property id='category'>function/production/manager</multi_property>
<multi_property id='base_category'>follow_up</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Sale</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/sale*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -988,8 +988,9 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
product = self.portal.software_product_module.newContent(
portal_type='Software Product')
self.assertSecurityGroup(product,
[self.user_id], False)
[self.user_id, 'F-SALE*'], False)
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, 'F-SALE*', ['Auditor'])
def test_SoftwareProduct_Project(self):
project = self.addProject()
......@@ -998,10 +999,12 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
product.edit(
follow_up_value=project)
self.assertSecurityGroup(product, [self.user_id,
'F-SALE*',
'%s_F-CUSTOMER' % project.getReference(),
'%s_F-PRODAGNT' % project.getReference(),
'%s_F-PRODMAN' % project.getReference()], False)
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, 'F-SALE*', ['Auditor'])
self.assertRoles(product, '%s_F-PRODMAN' % project.getReference(), ['Assignor'])
self.assertRoles(product, '%s_F-PRODAGNT' % project.getReference(), ['Assignee'])
self.assertRoles(product, '%s_F-CUSTOMER' % project.getReference(), ['Auditor'])
......
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