Commit 7f633fc7 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Update Web [Illustration|Table] Portal Type Roles

See merge request !451
parents 11f4db7d cbbb0964
Pipeline #24863 failed with stage
in 0 seconds
<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='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
...@@ -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):
product = self.portal.web_page_module.newContent( document = self.portal.web_page_module.newContent(
portal_type='Web Page') portal_type='Web Page')
product.updateLocalRolesOnSecurityGroups() document.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product, self.assertSecurityGroup(document,
['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):
......
...@@ -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">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</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">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</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>
......
...@@ -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
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