Commit b540b7ab authored by Romain Courteaud's avatar Romain Courteaud

Migrate service security

parent 451f9b56
...@@ -4,15 +4,6 @@ ...@@ -4,15 +4,6 @@
<item>Auditor</item> <item>Auditor</item>
<item>Author</item> <item>Author</item>
</role> </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'> <role id='admin'>
<item>Owner</item> <item>Owner</item>
</role> </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): ...@@ -862,3 +862,21 @@ class TestSaleInvoiceTransaction(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner']) 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 ...@@ -13,6 +13,7 @@ person_module
portal_contributions portal_contributions
sale_order_module sale_order_module
sale_packing_list_module sale_packing_list_module
service_module
software_installation_module software_installation_module
software_instance_module software_instance_module
software_product_module software_product_module
......
...@@ -13,6 +13,7 @@ person_module ...@@ -13,6 +13,7 @@ person_module
portal_contributions portal_contributions
sale_order_module sale_order_module
sale_packing_list_module sale_packing_list_module
service_module
software_installation_module software_installation_module
software_instance_module software_instance_module
software_product_module software_product_module
......
...@@ -35,6 +35,8 @@ Sale Order ...@@ -35,6 +35,8 @@ Sale Order
Sale Order Module Sale Order Module
Sale Packing List Sale Packing List
Sale Packing List Module Sale Packing List Module
Service
Service Module
Slave Instance Slave Instance
Software Installation Software Installation
Software Installation Module Software Installation Module
......
...@@ -35,6 +35,8 @@ Sale Order ...@@ -35,6 +35,8 @@ Sale Order
Sale Order Module Sale Order Module
Sale Packing List Sale Packing List
Sale Packing List Module Sale Packing List Module
Service
Service Module
Slave Instance Slave Instance
Software Installation Software Installation
Software Installation Module 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 561
\ No newline at end of file \ No newline at end of file
...@@ -55,7 +55,6 @@ query_module ...@@ -55,7 +55,6 @@ query_module
sale_opportunity_module sale_opportunity_module
sale_trade_condition_module sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration service_module/computer_registration
service_module/vifib_discount service_module/vifib_discount
service_module/vifib_registration service_module/vifib_registration
......
...@@ -55,7 +55,6 @@ query_module ...@@ -55,7 +55,6 @@ query_module
sale_opportunity_module sale_opportunity_module
sale_trade_condition_module sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration service_module/computer_registration
service_module/vifib_discount service_module/vifib_discount
service_module/vifib_registration service_module/vifib_registration
......
...@@ -50,8 +50,6 @@ Sale Opportunity ...@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module Sale Opportunity Module
Sale Trade Condition Sale Trade Condition
Sale Trade Condition Module Sale Trade Condition Module
Service
Service Module
Short Message Short Message
Site Message Site Message
Support Request Support Request
......
...@@ -50,8 +50,6 @@ Sale Opportunity ...@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module Sale Opportunity Module
Sale Trade Condition Sale Trade Condition
Sale Trade Condition Module Sale Trade Condition Module
Service
Service Module
Short Message Short Message
Site Message Site Message
Support Request 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