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
<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):
class TestWebPage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.web_page_module.newContent(
document = self.portal.web_page_module.newContent(
portal_type='Web Page')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
document.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(document,
['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):
......
......@@ -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">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</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">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</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>
......
......@@ -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
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