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
0
Merge Requests
0
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
Xavier Thompson
slapos.core
Commits
cbbb0964
Commit
cbbb0964
authored
Nov 17, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Update Web [Illustration|Table] Portal Type Roles
parent
737c0ad5
Changes
5
Hide 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 @
cbbb0964
<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 @
cbbb0964
<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 @
cbbb0964
...
...
@@ -2421,13 +2421,33 @@ class TestWebPageModule(TestSlapOSGroupRoleSecurityMixin):
class
TestWebPage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
produc
t
=
self
.
portal
.
web_page_module
.
newContent
(
documen
t
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
'Web Page'
)
produc
t
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
produc
t
,
documen
t
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
documen
t
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
document
,
'G-COMPANY'
,
[
'Assignor'
])
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
):
def
test
(
self
):
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.xml
View file @
cbbb0964
...
...
@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSERP5GroupRoleSecurity
</string>
</value>
...
...
@@ -55,28 +49,13 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -89,7 +68,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
cbbb0964
...
...
@@ -131,7 +131,9 @@ Upgrade Decision
Upgrade Decision Module
User Consumption HTML File
Visit
Web Illustration
Web Message
Web Page
Web Page Module
Web Table
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