Commit a6a3fce1 authored by Romain Courteaud's avatar Romain Courteaud

Migrate open order security configuration.

parent 1f4bb8b3
......@@ -4,9 +4,6 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
......
......@@ -4,9 +4,4 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</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>
\ No newline at end of file
<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'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
......
......@@ -749,3 +749,22 @@ class TestContributionTool(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(module, 'R-MEMBER', ['Author'])
self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor'])
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
\ No newline at end of file
79
\ No newline at end of file
......@@ -6,6 +6,7 @@ data_set_module
document_module
hosting_subscription_module
image_module
open_sale_order_module
organisation_module
person_module
portal_contributions
......
open_sale_order_module
computer_model_module
computer_module
computer_network_module
......
......@@ -16,6 +16,8 @@ Hosting Subscription
Hosting Subscription Module
Image
Image Module
Open Sale Order
Open Sale Order Module
Organisation
Organisation Module
PDF
......
Open Sale Order
Open Sale Order Module
Assignment
Computer
Computer Model
......
555
\ No newline at end of file
556
\ No newline at end of file
......@@ -26,7 +26,6 @@ inventory_module
knowledge_pad_module
meeting_module
notification_message_module
open_sale_order_module
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_updated_vifib_user_open_sale_order
......
......@@ -26,7 +26,6 @@ inventory_module
knowledge_pad_module
meeting_module
notification_message_module
open_sale_order_module
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_updated_vifib_user_open_sale_order
......
......@@ -38,8 +38,6 @@ Meeting Module
Note
Notification Message
Notification Message Module
Open Sale Order
Open Sale Order Module
Payment Transaction
Payzen Event
Phone Call
......
......@@ -38,8 +38,6 @@ Meeting Module
Note
Notification Message
Notification Message Module
Open Sale Order
Open Sale Order Module
Payment Transaction
Payzen Event
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