Commit 7db217cc authored by Romain Courteaud's avatar Romain Courteaud

Migrate security configuration.

parent b7335586
<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
......@@ -1181,3 +1181,195 @@ class TestVisit(TestSlapOSGroupRoleSecurityMixin):
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestNotificationMessageModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.notification_message_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestNotificationMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.notification_message_module.newContent(
portal_type='Notification Message')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestProductModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.product_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestProduct(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.product_module.newContent(
portal_type='Product')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestPurchaseOrderModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.purchase_order_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestPurchaseOrder(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.purchase_order_module.newContent(
portal_type='Purchase 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'])
class TestPurchaseTradeConditionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.purchase_trade_condition_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestPurchaseTradeCondition(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.purchase_trade_condition_module.newContent(
portal_type='Purchase Trade Condition')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestQueryModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.query_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestQuery(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.query_module.newContent(
portal_type='Query')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestSaleOpportunityModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.sale_opportunity_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestSaleOpportunity(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.sale_opportunity_module.newContent(
portal_type='Sale Opportunity')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestShortMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Short Message')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestSiteMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Site Message')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestWebMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Web Message')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestSupportRequestModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.support_request_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestSupportRequest(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.support_request_module.newContent(
portal_type='Support Request')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestTransformationModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.transformation_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestTransformation(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.transformation_module.newContent(
portal_type='Transformation')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestWebPageModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.web_page_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestWebPage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.web_page_module.newContent(
portal_type='Web Page')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
117
\ No newline at end of file
118
\ No newline at end of file
......@@ -16,11 +16,17 @@ image_module
inventory_module
knowledge_pad_module
meeting_module
notification_message_module
open_sale_order_module
organisation_module
person_module
portal_contributions
portal_gadgets
product_module
purchase_order_module
purchase_trade_condition_module
query_module
sale_opportunity_module
sale_order_module
sale_packing_list_module
sale_trade_condition_module
......@@ -28,4 +34,7 @@ service_module
software_installation_module
software_instance_module
software_product_module
software_release_module
\ No newline at end of file
software_release_module
support_request_module
transformation_module
web_page_module
\ No newline at end of file
......@@ -16,11 +16,17 @@ image_module
inventory_module
knowledge_pad_module
meeting_module
notification_message_module
open_sale_order_module
organisation_module
person_module
portal_contributions
portal_gadgets
product_module
purchase_order_module
purchase_trade_condition_module
query_module
sale_opportunity_module
sale_order_module
sale_packing_list_module
sale_trade_condition_module
......@@ -28,4 +34,7 @@ service_module
software_installation_module
software_instance_module
software_product_module
software_release_module
\ No newline at end of file
software_release_module
support_request_module
transformation_module
web_page_module
\ No newline at end of file
......@@ -48,6 +48,8 @@ Mail Message
Meeting
Meeting Module
Note
Notification Message
Notification Message Module
Open Sale Order
Open Sale Order Module
Organisation
......@@ -58,8 +60,18 @@ Person
Person Module
Phone Call
Presentation
Product
Product Module
Purchase Invoice Transaction
Purchase Order
Purchase Order Module
Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity Module
Sale Order
Sale Order Module
Sale Packing List
......@@ -68,6 +80,8 @@ Sale Trade Condition
Sale Trade Condition Module
Service
Service Module
Short Message
Site Message
Slave Instance
Software Installation
Software Installation Module
......@@ -78,5 +92,12 @@ Software Product Module
Software Release
Software Release Module
Spreadsheet
Support Request
Support Request Module
Text
Visit
\ No newline at end of file
Transformation
Transformation Module
Visit
Web Message
Web Page
Web Page Module
\ No newline at end of file
Account
Account Module
Accounting Period
Visit
Accounting Transaction
Accounting Transaction Module
Acknowledgement
......@@ -49,6 +48,8 @@ Mail Message
Meeting
Meeting Module
Note
Notification Message
Notification Message Module
Open Sale Order
Open Sale Order Module
Organisation
......@@ -59,8 +60,18 @@ Person
Person Module
Phone Call
Presentation
Product
Product Module
Purchase Invoice Transaction
Purchase Order
Purchase Order Module
Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity Module
Sale Order
Sale Order Module
Sale Packing List
......@@ -69,6 +80,8 @@ Sale Trade Condition
Sale Trade Condition Module
Service
Service Module
Short Message
Site Message
Slave Instance
Software Installation
Software Installation Module
......@@ -79,4 +92,12 @@ Software Product Module
Software Release
Software Release Module
Spreadsheet
Text
\ No newline at end of file
Support Request
Support Request Module
Text
Transformation
Transformation Module
Visit
Web Message
Web Page
Web Page Module
\ No newline at end of file
<type_roles>
<role id='Assignee'>
<property id='title'>Acquired Assignee</property>
<property id='description'>If this query is associated to a document, the Assignee of the query is the Assignee of the document it is related to.</property>
<property id='base_category_script'>ERP5Type_acquireSecurityFromCategory</property>
<multi_property id='base_category'>agent</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>
</type_roles>
\ No newline at end of file
590
\ No newline at end of file
591
\ No newline at end of file
notification_message_module
portal_integrations
portal_integrations/slapos_payzen_test_integration
product_module
purchase_order_module
purchase_trade_condition_module
query_module
sale_opportunity_module
support_request_module
system_event_module
tax_module
transformation_module
web_page_module
\ No newline at end of file
tax_module
\ No newline at end of file
notification_message_module
portal_integrations
portal_integrations/slapos_payzen_test_integration
product_module
purchase_order_module
purchase_trade_condition_module
query_module
sale_opportunity_module
support_request_module
system_event_module
tax_module
transformation_module
web_page_module
\ No newline at end of file
tax_module
\ No newline at end of file
......@@ -2,28 +2,7 @@ Business Process
Business Process Module
Integration Site
Integration Tool
Notification Message
Notification Message Module
Payzen Event
Product
Product Module
Purchase Order
Purchase Order Module
Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Opportunity
Sale Opportunity Module
Short Message
Site Message
Support Request
Support Request Module
System Event Module
Tax
Tax Module
Transformation
Transformation Module
Web Message
Web Page
Web Page Module
\ No newline at end of file
Tax Module
\ No newline at end of file
Integration Site
Business Process
Business Process Module
Integration Site
Integration Tool
Notification Message
Notification Message Module
Payzen Event
Product
Product Module
Purchase Order
Purchase Order Module
Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Opportunity
Sale Opportunity Module
Short Message
Site Message
Support Request
Support Request Module
System Event Module
Tax
Tax Module
Transformation
Transformation Module
Web Message
Web Page
Web Page Module
\ No newline at end of file
Tax Module
\ 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