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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
8ad1fe55
Commit
8ad1fe55
authored
Nov 06, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test Integration Site/Tool local roles
parent
c9899abe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
32 deletions
+20
-32
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml
...lapos_erp5/LocalRolesTemplateItem/portal_integrations.xml
+0
-8
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml
...em/portal_integrations/slapos_payzen_test_integration.xml
+0
-6
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_wechat_test_integration.xml
...em/portal_integrations/slapos_wechat_test_integration.xml
+0
-6
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml
...s_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml
+0
-6
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml
...s_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml
+0
-6
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+20
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml
View file @
8ad1fe55
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'R-SHADOW-PERSON'
>
<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_id
id=
'shadow'
>
<principal
id=
'R-SHADOW-PERSON'
>
Auditor
</principal>
</local_role_group_id>
...
...
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml
View file @
8ad1fe55
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Assignor
</item>
</role>
<role
id=
'R-SHADOW-PERSON'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id
id=
'group'
>
<principal
id=
'G-COMPANY'
>
Assignor
</principal>
</local_role_group_id>
<local_role_group_id
id=
'shadow'
>
<principal
id=
'R-SHADOW-PERSON'
>
Auditor
</principal>
<principal
id=
'R-SHADOW-PERSON'
>
Author
</principal>
...
...
master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_wechat_test_integration.xml
View file @
8ad1fe55
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Assignor
</item>
</role>
<role
id=
'R-SHADOW-PERSON'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id
id=
'group'
>
<principal
id=
'G-COMPANY'
>
Assignor
</principal>
</local_role_group_id>
<local_role_group_id
id=
'shadow'
>
<principal
id=
'R-SHADOW-PERSON'
>
Auditor
</principal>
<principal
id=
'R-SHADOW-PERSON'
>
Author
</principal>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml
View file @
8ad1fe55
<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>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Person Shadow
</property>
<multi_property
id=
'categories'
>
local_role_group/shadow
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml
View file @
8ad1fe55
<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>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Person Shadow
</property>
<multi_property
id=
'categories'
>
local_role_group/shadow
</multi_property>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
8ad1fe55
...
...
@@ -2009,3 +2009,23 @@ class TestConsumptionDocumentModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestIntegrationTool
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_IntegrationTool
(
self
):
module
=
self
.
portal
.
portal_integrations
self
.
assertSecurityGroup
(
module
,
[
'R-SHADOW-PERSON'
,
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestIntegrationSite
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_IntegrationSite_default
(
self
):
delivery
=
self
.
portal
.
portal_integrations
.
newContent
(
portal_type
=
'Integration Site'
)
self
.
assertSecurityGroup
(
delivery
,
[
'R-SHADOW-PERSON'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
'R-SHADOW-PERSON'
,
[
'Auditor'
,
'Author'
])
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