Commit fdcc621d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Administrator is only Auditor over the Sale Packing List

  Sale Packing List is fully automated on SlapOS Master, so Administrator shoudn't edit the packing lists.
parent 01e116b0
<type_roles>
<role id='Assignor'>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='categories'>local_role_group/group</multi_property>
<multi_property id='category'>group/company</multi_property>
......
......@@ -950,7 +950,7 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
def test_GroupCustomerSubscription(self):
......@@ -966,7 +966,7 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, person.getUserId()], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, person.getUserId(), ['Auditor'])
......@@ -983,7 +983,7 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, person.getUserId()], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, person.getUserId(), ['Auditor'])
......@@ -1000,7 +1000,7 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, person.getUserId()], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, person.getUserId(), ['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