Commit 6a331abc authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Allow Administrator/Accountant access document module and PDF

parent 749007b0
<local_roles_item>
<local_roles>
</local_roles>
</local_roles_item>
\ No newline at end of file
<type_roles>
<role id='Author; 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>
<multi_property id='base_category'>group</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Assignor'>
<property id='title'>Group company</property>
<multi_property id='categories'>local_role_group/group</multi_property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -2403,6 +2403,26 @@ class TestUserConsumptionHTMLFile(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(html_document, customer.getUserId(), ['Assignee'])
self.assertRoles(html_document, self.user_id, ['Owner'])
class TestDocumentModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.document_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
[self.user_id, 'G-COMPANY'], False)
self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestPDF(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
text = self.portal.document_module.newContent(
portal_type='PDF')
self.assertSecurityGroup(text,
['G-COMPANY', self.user_id],
False)
self.assertRoles(text, 'G-COMPANY', ['Assignor'])
self.assertRoles(text, self.user_id, ['Owner'])
class TestCloudContractModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.cloud_contract_module
......
......@@ -43,6 +43,7 @@ data_stream_module
data_supply_module
data_transformation_module
document_ingestion_module
document_module
event_module
event_module/slapos_crm_web_message_template
incident_response_module
......
......@@ -48,6 +48,7 @@ Data Supply Module
Data Transformation
Data Transformation Module
Document Ingestion Module
Document Module
ERP5 Login
Event Module
Facebook Login
......@@ -70,6 +71,7 @@ Open Sale Order
Open Sale Order Module
Organisation
Organisation Module
PDF
Payment Transaction
Payzen Event
Person
......
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