Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
e5a487b7
Commit
e5a487b7
authored
Dec 09, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: add security configuration
parent
0fb48740
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
444 additions
and
1 deletion
+444
-1
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_array_module.xml
.../slapos_erp5/LocalRolesTemplateItem/data_array_module.xml
+14
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_ingestion_module.xml
...pos_erp5/LocalRolesTemplateItem/data_ingestion_module.xml
+18
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_mapping_module.xml
...lapos_erp5/LocalRolesTemplateItem/data_mapping_module.xml
+14
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_operation_module.xml
...pos_erp5/LocalRolesTemplateItem/data_operation_module.xml
+17
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_stream_module.xml
...slapos_erp5/LocalRolesTemplateItem/data_stream_module.xml
+18
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_supply_module.xml
...slapos_erp5/LocalRolesTemplateItem/data_supply_module.xml
+17
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_transformation_module.xml
...rp5/LocalRolesTemplateItem/data_transformation_module.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Array%20Module.xml
...rp5/PortalTypeRolesTemplateItem/Data%20Array%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Array.xml
.../slapos_erp5/PortalTypeRolesTemplateItem/Data%20Array.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Ingestion%20Module.xml
...PortalTypeRolesTemplateItem/Data%20Ingestion%20Module.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Ingestion.xml
...pos_erp5/PortalTypeRolesTemplateItem/Data%20Ingestion.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Mapping%20Module.xml
...5/PortalTypeRolesTemplateItem/Data%20Mapping%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Mapping.xml
...lapos_erp5/PortalTypeRolesTemplateItem/Data%20Mapping.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Operation%20Module.xml
...PortalTypeRolesTemplateItem/Data%20Operation%20Module.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Operation.xml
...pos_erp5/PortalTypeRolesTemplateItem/Data%20Operation.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Stream%20Module.xml
...p5/PortalTypeRolesTemplateItem/Data%20Stream%20Module.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Stream.xml
...slapos_erp5/PortalTypeRolesTemplateItem/Data%20Stream.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Supply%20Module.xml
...p5/PortalTypeRolesTemplateItem/Data%20Supply%20Module.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Supply.xml
...slapos_erp5/PortalTypeRolesTemplateItem/Data%20Supply.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Transformation%20Module.xml
...lTypeRolesTemplateItem/Data%20Transformation%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Transformation.xml
...rp5/PortalTypeRolesTemplateItem/Data%20Transformation.xml
+8
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+159
-1
master/bt5/slapos_erp5/bt/template_local_role_list
master/bt5/slapos_erp5/bt/template_local_role_list
+7
-0
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+14
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_array_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_ingestion_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_mapping_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_operation_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_stream_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_supply_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/LocalRolesTemplateItem/data_transformation_module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Array%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Array.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Ingestion%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Ingestion.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Mapping%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Mapping.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Operation%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Operation.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Stream%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Stream.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Supply%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Supply.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Transformation%20Module.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Transformation.xml
0 → 100644
View file @
e5a487b7
<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
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
e5a487b7
...
...
@@ -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'
])
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
e5a487b7
...
...
@@ -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
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
e5a487b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment