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
7f633fc7
Commit
7f633fc7
authored
Nov 17, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_erp5: Update Web [Illustration|Table] Portal Type Roles
See merge request
nexedi/slapos.core!451
parents
11f4db7d
cbbb0964
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
29 deletions
+46
-29
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Illustration.xml
...s_erp5/PortalTypeRolesTemplateItem/Web%20Illustration.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Table.xml
...5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Table.xml
+8
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+25
-5
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.xml
..._components/test.erp5.testSlapOSERP5GroupRoleSecurity.xml
+3
-24
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+2
-0
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Illustration.xml
0 → 100644
View file @
7f633fc7
<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/Web%20Table.xml
0 → 100644
View file @
7f633fc7
<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 @
7f633fc7
...
@@ -2421,13 +2421,33 @@ class TestWebPageModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -2421,13 +2421,33 @@ class TestWebPageModule(TestSlapOSGroupRoleSecurityMixin):
class
TestWebPage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestWebPage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
produc
t
=
self
.
portal
.
web_page_module
.
newContent
(
documen
t
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
)
portal_type
=
'Web Page'
)
produc
t
.
updateLocalRolesOnSecurityGroups
()
documen
t
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
produc
t
,
self
.
assertSecurityGroup
(
documen
t
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
document
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
document
,
self
.
user_id
,
[
'Owner'
])
class
TestWebTable
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
document
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Table'
)
document
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
document
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
document
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
document
,
self
.
user_id
,
[
'Owner'
])
class
TestWebIllustration
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
document
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Illustration'
)
document
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
document
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
document
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
document
,
self
.
user_id
,
[
'Owner'
])
class
TestIntegrationTool
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestIntegrationTool
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.xml
View file @
7f633fc7
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSERP5GroupRoleSecurity
</string>
</value>
<value>
<string>
testSlapOSERP5GroupRoleSecurity
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
7f633fc7
...
@@ -131,7 +131,9 @@ Upgrade Decision
...
@@ -131,7 +131,9 @@ Upgrade Decision
Upgrade Decision Module
Upgrade Decision Module
User Consumption HTML File
User Consumption HTML File
Visit
Visit
Web Illustration
Web Message
Web Message
Web Page
Web Page
Web Page Module
Web Page Module
Web Table
Wechat Event
Wechat Event
\ No newline at end of file
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