Commit e5a487b7 authored by Xiaowu Zhang's avatar Xiaowu Zhang

slapos_erp5: add security configuration

parent 0fb48740
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-COMPUTER'>
<item>Auditor</item>
<item>Author</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-COMPUTER'>
<item>Auditor</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-COMPUTER'>
<item>Auditor</item>
<item>Author</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-COMPUTER'>
<item>Auditor</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
<item>Author</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
</local_role_group_ids>
</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
<type_roles>
<role id='Author; Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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
<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
<type_roles>
<role id='Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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='Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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
<type_roles>
<role id='Author; Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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
<type_roles>
<role id='Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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='Auditor'>
<property id='title'>Compute Node</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<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
<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
......@@ -2590,4 +2590,162 @@ class TestUpgradeDecision(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(upgrade_decision, 'G-COMPANY', ['Assignor'])
self.assertRoles(upgrade_decision, person.getUserId(), ['Assignee'])
self.assertRoles(upgrade_decision, self.user_id, ['Owner'])
self.assertRoles(upgrade_decision, organisation.getReference(), ['Assignee'])
\ No newline at end of file
self.assertRoles(upgrade_decision, organisation.getReference(), ['Assignee'])
class TestDataStreamModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataStreamModule(self):
module = self.portal.data_stream_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-COMPUTER', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataStream(TestSlapOSGroupRoleSecurityMixin):
def test_DataStream(self):
data_stream = self.portal.data_stream_module.newContent(
portal_type='Data Stream')
self.assertSecurityGroup(data_stream,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(data_stream, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_stream, 'R-COMPUTER', ['Assignor'])
self.assertRoles(data_stream, self.user_id, ['Owner'])
class TestDataIngestionModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataIngestionModule(self):
module = self.portal.data_ingestion_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-COMPUTER', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataIngestion(TestSlapOSGroupRoleSecurityMixin):
def test_DataIngestion(self):
data_ingestion = self.portal.data_ingestion_module.newContent(
portal_type='Data Ingestion')
self.assertSecurityGroup(data_ingestion,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(data_ingestion, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_ingestion, 'R-COMPUTER', ['Assignor'])
self.assertRoles(data_ingestion, self.user_id, ['Owner'])
class TestDataOperationModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataOperationModule(self):
module = self.portal.data_operation_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-COMPUTER', ['Auditor'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataOperation(TestSlapOSGroupRoleSecurityMixin):
def test_DataOperation(self):
data_operation = self.portal.data_operation_module.newContent(
portal_type='Data Operation')
self.assertSecurityGroup(data_operation,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(data_operation, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_operation, 'R-COMPUTER', ['Auditor'])
self.assertRoles(data_operation, self.user_id, ['Owner'])
class TestDataSupplyModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataSupplyModule(self):
module = self.portal.data_supply_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-COMPUTER', ['Auditor'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataSupply(TestSlapOSGroupRoleSecurityMixin):
def test_DataSupply(self):
data_supply = self.portal.data_supply_module.newContent(
portal_type='Data Supply')
self.assertSecurityGroup(data_supply,
['G-COMPANY', 'R-COMPUTER', self.user_id],
False)
self.assertRoles(data_supply, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_supply, 'R-COMPUTER', ['Auditor'])
self.assertRoles(data_supply, self.user_id, ['Owner'])
class TestDataMappingModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataMappingModule(self):
module = self.portal.data_mapping_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataMapping(TestSlapOSGroupRoleSecurityMixin):
def test_DataMapping(self):
data_mapping = self.portal.data_mapping_module.newContent(
portal_type='Data Mapping')
self.assertSecurityGroup(data_mapping,
['G-COMPANY', self.user_id],
False)
self.assertRoles(data_mapping, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_mapping, self.user_id, ['Owner'])
class TestDataTransformationModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataTransformationModule(self):
module = self.portal.data_transformation_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataTransformation(TestSlapOSGroupRoleSecurityMixin):
def test_DataTransformation(self):
data_transformation = self.portal.data_transformation_module.newContent(
portal_type='Data Transformation')
self.assertSecurityGroup(data_transformation,
['G-COMPANY', self.user_id],
False)
self.assertRoles(data_transformation, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_transformation, self.user_id, ['Owner'])
class TestDataArrayModule(TestSlapOSGroupRoleSecurityMixin):
def test_DataArrayModule(self):
module = self.portal.data_array_module
self.changeOwnership(module)
self.assertSecurityGroup(module,
['G-COMPANY', self.user_id],
False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, self.user_id, ['Owner'])
class TestDataArray(TestSlapOSGroupRoleSecurityMixin):
def test_DataArray(self):
data_array = self.portal.data_array_module.newContent(
portal_type='Data Array')
self.assertSecurityGroup(data_array,
['G-COMPANY', self.user_id],
False)
self.assertRoles(data_array, 'G-COMPANY', ['Assignor'])
self.assertRoles(data_array, self.user_id, ['Owner'])
......@@ -34,7 +34,14 @@ credential_update_module
currency_module
currency_module/CNY
currency_module/EUR
data_array_module
data_ingestion_module
data_mapping_module
data_operation_module
data_set_module
data_stream_module
data_supply_module
data_transformation_module
document_ingestion_module
event_module
event_module/slapos_crm_web_message_template
......
......@@ -31,8 +31,22 @@ Credential Update Module
Credit Card
Currency
Currency Module
Data Array
Data Array Module
Data Ingestion
Data Ingestion Module
Data Mapping
Data Mapping Module
Data Operation
Data Operation Module
Data Set
Data Set Module
Data Stream
Data Stream Module
Data Supply
Data Supply Module
Data Transformation
Data Transformation Module
Document Ingestion Module
ERP5 Login
Event 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