Commit a6a3fce1 authored by Romain Courteaud's avatar Romain Courteaud

Migrate open order security configuration.

parent 1f4bb8b3
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
<item>Auditor</item> <item>Auditor</item>
<item>Author</item> <item>Author</item>
</role> </role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
...@@ -4,9 +4,4 @@ ...@@ -4,9 +4,4 @@
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
<type_roles> <type_roles>
<role id='Auditor'>
<property id='title'>Destination Decision</property>
<property id='description'>Monovalued role</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='base_category'>destination_decision</multi_property>
</role>
<role id='Assignor'> <role id='Assignor'>
<property id='title'>Group company</property> <property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>group/company</multi_property>
......
...@@ -749,3 +749,22 @@ class TestContributionTool(TestSlapOSGroupRoleSecurityMixin): ...@@ -749,3 +749,22 @@ class TestContributionTool(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(module, 'R-MEMBER', ['Author']) self.assertRoles(module, 'R-MEMBER', ['Author'])
self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor']) self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestOpenSaleOrderModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.open_sale_order_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestOpenSaleOrder(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.open_sale_order_module.newContent(
portal_type='Open Sale Order')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
78 79
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,7 @@ data_set_module ...@@ -6,6 +6,7 @@ data_set_module
document_module document_module
hosting_subscription_module hosting_subscription_module
image_module image_module
open_sale_order_module
organisation_module organisation_module
person_module person_module
portal_contributions portal_contributions
......
open_sale_order_module
computer_model_module computer_model_module
computer_module computer_module
computer_network_module computer_network_module
......
...@@ -16,6 +16,8 @@ Hosting Subscription ...@@ -16,6 +16,8 @@ Hosting Subscription
Hosting Subscription Module Hosting Subscription Module
Image Image
Image Module Image Module
Open Sale Order
Open Sale Order Module
Organisation Organisation
Organisation Module Organisation Module
PDF PDF
......
Open Sale Order
Open Sale Order Module
Assignment Assignment
Computer Computer
Computer Model Computer Model
......
555 556
\ No newline at end of file \ No newline at end of file
...@@ -26,7 +26,6 @@ inventory_module ...@@ -26,7 +26,6 @@ inventory_module
knowledge_pad_module knowledge_pad_module
meeting_module meeting_module
notification_message_module notification_message_module
open_sale_order_module
open_sale_order_module/test_hr_admin_open_sale_order open_sale_order_module/test_hr_admin_open_sale_order
open_sale_order_module/test_sale_agent_open_sale_order open_sale_order_module/test_sale_agent_open_sale_order
open_sale_order_module/test_updated_vifib_user_open_sale_order open_sale_order_module/test_updated_vifib_user_open_sale_order
......
...@@ -26,7 +26,6 @@ inventory_module ...@@ -26,7 +26,6 @@ inventory_module
knowledge_pad_module knowledge_pad_module
meeting_module meeting_module
notification_message_module notification_message_module
open_sale_order_module
open_sale_order_module/test_hr_admin_open_sale_order open_sale_order_module/test_hr_admin_open_sale_order
open_sale_order_module/test_sale_agent_open_sale_order open_sale_order_module/test_sale_agent_open_sale_order
open_sale_order_module/test_updated_vifib_user_open_sale_order open_sale_order_module/test_updated_vifib_user_open_sale_order
......
...@@ -38,8 +38,6 @@ Meeting Module ...@@ -38,8 +38,6 @@ Meeting Module
Note Note
Notification Message Notification Message
Notification Message Module Notification Message Module
Open Sale Order
Open Sale Order Module
Payment Transaction Payment Transaction
Payzen Event Payzen Event
Phone Call Phone Call
......
...@@ -38,8 +38,6 @@ Meeting Module ...@@ -38,8 +38,6 @@ Meeting Module
Note Note
Notification Message Notification Message
Notification Message Module Notification Message Module
Open Sale Order
Open Sale Order Module
Payment Transaction Payment Transaction
Payzen Event Payzen Event
Phone Call Phone Call
......
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