Commit 5cee4250 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test Document Ingestion Module local roles

parent 5a8b805e
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='G-COMPANY'> <role id='F-ACCOUNTING*'>
<item>Auditor</item> <item>Auditor</item>
<item>Author</item> <item>Author</item>
</role> </role>
</local_roles> </local_roles>
<local_role_group_ids> <local_role_group_ids>
<local_role_group_id id='group'> <local_role_group_id id='function'>
<principal id='G-COMPANY'>Auditor</principal> <principal id='F-ACCOUNTING*'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal> <principal id='F-ACCOUNTING*'>Author</principal>
</local_role_group_id> </local_role_group_id>
</local_role_group_ids> </local_role_group_ids>
</local_roles_item> </local_roles_item>
\ No newline at end of file
<type_roles> <type_roles>
<role id='Author; Auditor'> <role id='Author; Auditor'>
<property id='title'>Group company</property> <property id='title'>Accountant</property>
<multi_property id='categories'>local_role_group/group</multi_property> <multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>function/accounting*</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>function</multi_property>
</role> </role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -1872,6 +1872,16 @@ class TestCertificateLogin(TestSlapOSGroupRoleSecurityMixin): ...@@ -1872,6 +1872,16 @@ class TestCertificateLogin(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(delivery, compute_node.getUserId(), ['Assignor']) self.assertRoles(delivery, compute_node.getUserId(), ['Assignor'])
class TestDocumentIngestionModule(TestSlapOSGroupRoleSecurityMixin):
def test_DocumentIngestionModule(self):
module = self.portal.document_ingestion_module
# XXX Why does it acquire local roles
self.assertSecurityGroup(module,
['F-ACCOUNTING*', module.Base_getOwnerId()], True)
self.assertRoles(module, 'F-ACCOUNTING*', ['Auditor', 'Author'])
self.assertRoles(module, module.Base_getOwnerId(), ['Owner'])
class TestDocumentModule(TestSlapOSGroupRoleSecurityMixin): class TestDocumentModule(TestSlapOSGroupRoleSecurityMixin):
def test_DocumentModule(self): def test_DocumentModule(self):
module = self.portal.document_module module = self.portal.document_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