Commit b540b7ab authored by Romain Courteaud's avatar Romain Courteaud

Migrate service security

parent 451f9b56
......@@ -4,15 +4,6 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-COMPUTER'>
<item>Auditor</item>
</role>
<role id='R-INSTANCE'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
......
<type_roles>
<role id='Author; Auditor'>
<property id='title'>Group company</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='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -862,3 +862,21 @@ class TestSaleInvoiceTransaction(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestServiceModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.service_module
self.assertSecurityGroup(module,
['G-COMPANY', 'admin'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'admin', ['Owner'])
class TestService(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.service_module.newContent(
portal_type='Service')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
......@@ -13,6 +13,7 @@ person_module
portal_contributions
sale_order_module
sale_packing_list_module
service_module
software_installation_module
software_instance_module
software_product_module
......
......@@ -13,6 +13,7 @@ person_module
portal_contributions
sale_order_module
sale_packing_list_module
service_module
software_installation_module
software_instance_module
software_product_module
......
......@@ -35,6 +35,8 @@ Sale Order
Sale Order Module
Sale Packing List
Sale Packing List Module
Service
Service Module
Slave Instance
Software Installation
Software Installation Module
......
......@@ -35,6 +35,8 @@ Sale Order
Sale Order Module
Sale Packing List
Sale Packing List Module
Service
Service Module
Slave Instance
Software Installation
Software Installation Module
......
<type_roles>
<role id='Auditor'>
<property id='title'>Computer</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Author; Auditor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</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'>Computer</property>
<multi_property id='category'>role/computer</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</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
560
\ No newline at end of file
561
\ No newline at end of file
......@@ -55,7 +55,6 @@ query_module
sale_opportunity_module
sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration
service_module/vifib_discount
service_module/vifib_registration
......
......@@ -55,7 +55,6 @@ query_module
sale_opportunity_module
sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration
service_module/vifib_discount
service_module/vifib_registration
......
......@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module
Sale Trade Condition
Sale Trade Condition Module
Service
Service Module
Short Message
Site Message
Support Request
......
......@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module
Sale Trade Condition
Sale Trade Condition Module
Service
Service Module
Short Message
Site Message
Support Request
......
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