Commit 3c31284f authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: fixup Service local roles

parent b361ceea
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
</role>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
......
<type_roles>
<role id='Auditor'>
<property id='title'>Accounting</property>
<property id='description'>`Sale` people can NOT create/modify `Service`. This comes from the `bt5`, and can be really fragile to change for now.</property>
<multi_property id='category'>function/accounting*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Project Compute Node Manager</property>
<property id='description'>XXX TODO
......
<type_roles>
<role id='Auditor'>
<property id='title'>Accounting</property>
<property id='description'>`Sale` people can NOT create/modify `Service`. This comes from the `bt5`, and can be really fragile to change for now.
XXX TODO
add local roles group</property>
<multi_property id='category'>function/accounting*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Project Compute Node Manager</property>
<property id='description'>XXX TODO
......
......@@ -1715,3 +1715,31 @@ class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(delivery, 'F-SALE*', ['Auditor'])
self.assertRoles(delivery, 'F-ACCOUNTING*', ['Auditor'])
class TestServiceModule(TestSlapOSGroupRoleSecurityMixin):
def test_ServiceModule(self):
module = self.portal.service_module
# XXX why does this module acquires local roles
self.assertSecurityGroup(module,
['F-SALE*', 'F-ACCOUNTING*', 'F-CUSTOMER', 'F-PRODUCTION*',
module.Base_getOwnerId()], True)
self.assertRoles(module, 'F-SALE*', ['Auditor'])
self.assertRoles(module, 'F-ACCOUNTING*', ['Auditor'])
self.assertRoles(module, 'F-CUSTOMER', ['Auditor'])
self.assertRoles(module, 'F-PRODUCTION*', ['Auditor'])
self.assertRoles(module, module.Base_getOwnerId(), ['Owner'])
class TestService(TestSlapOSGroupRoleSecurityMixin):
def test_Service_default(self):
delivery = self.portal.service_module.newContent(
portal_type='Service')
self.assertSecurityGroup(delivery,
['F-SALE*', 'F-ACCOUNTING*', 'F-CUSTOMER', 'F-PRODUCTION*',
self.user_id], False)
self.assertRoles(delivery, self.user_id, ['Owner'])
self.assertRoles(delivery, 'F-SALE*', ['Auditor'])
self.assertRoles(delivery, 'F-ACCOUNTING*', ['Auditor'])
self.assertRoles(delivery, 'F-CUSTOMER', ['Auditor'])
self.assertRoles(delivery, 'F-PRODUCTION*', ['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