Commit 3b7e4ac6 authored by Romain Courteaud's avatar Romain Courteaud

Migrate security configuration.

parent 17f15544
......@@ -932,3 +932,252 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountingPeriod(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.organisation_module.newContent(
portal_type='Organisation').newContent(
portal_type='Accounting Period')
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 TestAcknowledgement(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Acknowledgement')
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 TestBankAccount(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.organisation_module.newContent(
portal_type='Organisation').newContent(
portal_type='Bank Account')
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 TestCampaignModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.campaign_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestCampaign(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.campaign_module.newContent(
portal_type='Campaign')
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 TestCashRegister(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.organisation_module.newContent(
portal_type='Organisation').newContent(
portal_type='Cash Register')
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 TestComponentModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.component_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestComponent(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.component_module.newContent(
portal_type='Component')
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 TestCreditCard(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.organisation_module.newContent(
portal_type='Organisation').newContent(
portal_type='Credit Card')
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 TestDocumentIngestionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.document_ingestion_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestEventModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.event_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestFaxMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Fax 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 TestGadget(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.portal_gadgets.newContent(
portal_type='Gadget')
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 TestGadgetTool(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.portal_gadgets
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestInventory(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.inventory_module.newContent(
portal_type='Inventory')
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 TestInventoryModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.inventory_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestKnowledgeBox(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.knowledge_pad_module.newContent(
portal_type='Knowledge Pad').newContent(
portal_type='Knowledge Box')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], True)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestKnowledgePad(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.knowledge_pad_module.newContent(
portal_type='Knowledge Pad')
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 TestKnowledgePadModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.knowledge_pad_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestLetter(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Letter')
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 TestMailMessage(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Mail 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 TestMeeting(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.meeting_module.newContent(
portal_type='Meeting')
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 TestMeetingModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.meeting_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'zope', ['Owner'])
class TestNote(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Note')
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 TestPhoneCall(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Phone Call')
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 TestVisit(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.event_module.newContent(
portal_type='Visit')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, self.user_id, ['Owner'])
116
\ No newline at end of file
117
\ No newline at end of file
account_module
accounting_module
campaign_module
component_module
computer_model_module
computer_module
computer_network_module
credential_update_module
currency_module
data_set_module
document_ingestion_module
document_module
event_module
hosting_subscription_module
image_module
inventory_module
knowledge_pad_module
meeting_module
open_sale_order_module
organisation_module
person_module
portal_contributions
portal_gadgets
sale_order_module
sale_packing_list_module
sale_trade_condition_module
......
account_module
accounting_module
campaign_module
component_module
computer_model_module
computer_module
computer_network_module
credential_update_module
currency_module
data_set_module
document_ingestion_module
document_module
event_module
hosting_subscription_module
image_module
inventory_module
knowledge_pad_module
meeting_module
open_sale_order_module
organisation_module
person_module
portal_contributions
portal_gadgets
sale_order_module
sale_packing_list_module
sale_trade_condition_module
......
Account
Account Module
Accounting Period
Accounting Transaction
Accounting Transaction Module
Acknowledgement
Assignment
Balance Transaction
Bank Account
Campaign
Campaign Module
Cash Register
Component
Component Module
Computer
Computer Model
Computer Model Module
......@@ -13,17 +21,33 @@ Computer Network Module
Computer Partition
Contribution Tool
Credential Update Module
Credit Card
Currency
Currency Module
Data Set
Data Set Module
Document Ingestion Module
Document Module
Drawing
Event Module
Fax Message
File
Gadget
Gadget Tool
Hosting Subscription
Hosting Subscription Module
Image
Image Module
Inventory
Inventory Module
Knowledge Box
Knowledge Pad
Knowledge Pad Module
Letter
Mail Message
Meeting
Meeting Module
Note
Open Sale Order
Open Sale Order Module
Organisation
......@@ -32,6 +56,7 @@ PDF
Payment Transaction
Person
Person Module
Phone Call
Presentation
Purchase Invoice Transaction
Sale Invoice Transaction
......@@ -54,3 +79,4 @@ Software Release
Software Release Module
Spreadsheet
Text
Visit
\ No newline at end of file
Account
Account Module
Accounting Period
Visit
Accounting Transaction
Accounting Transaction Module
Acknowledgement
Assignment
Balance Transaction
Bank Account
Campaign
Campaign Module
Cash Register
Component
Component Module
Computer
Computer Model
Computer Model Module
......@@ -13,17 +22,33 @@ Computer Network Module
Computer Partition
Contribution Tool
Credential Update Module
Credit Card
Currency
Currency Module
Data Set
Data Set Module
Document Ingestion Module
Document Module
Drawing
Event Module
Fax Message
File
Gadget
Gadget Tool
Hosting Subscription
Hosting Subscription Module
Image
Image Module
Inventory
Inventory Module
Knowledge Box
Knowledge Pad
Knowledge Pad Module
Letter
Mail Message
Meeting
Meeting Module
Note
Open Sale Order
Open Sale Order Module
Organisation
......@@ -32,6 +57,7 @@ PDF
Payment Transaction
Person
Person Module
Phone Call
Presentation
Purchase Invoice Transaction
Sale Invoice Transaction
......
589
\ No newline at end of file
590
\ No newline at end of file
campaign_module
component_module
document_ingestion_module
event_module
inventory_module
knowledge_pad_module
meeting_module
notification_message_module
portal_gadgets
portal_integrations
portal_integrations/slapos_payzen_test_integration
product_module
......
campaign_module
component_module
document_ingestion_module
event_module
inventory_module
knowledge_pad_module
meeting_module
notification_message_module
portal_gadgets
portal_integrations
portal_integrations/slapos_payzen_test_integration
product_module
......
Accounting Period
Acknowledgement
Bank Account
Business Process
Business Process Module
Campaign
Campaign Module
Cash Register
Component
Component Module
Credit Card
Document Ingestion Module
Event Module
Fax Message
Gadget
Gadget Tool
Integration Site
Integration Tool
Inventory
Inventory Module
Knowledge Box
Knowledge Pad
Knowledge Pad Module
Letter
Mail Message
Meeting
Meeting Module
Note
Notification Message
Notification Message Module
Payzen Event
Phone Call
Product
Product Module
Purchase Order
......@@ -49,7 +24,6 @@ Tax
Tax Module
Transformation
Transformation Module
Visit
Web Message
Web Page
Web Page Module
\ No newline at end of file
Accounting Period
Acknowledgement
Bank Account
Integration Site
Business Process
Business Process Module
Campaign
Campaign Module
Cash Register
Component
Component Module
Credit Card
Document Ingestion Module
Event Module
Fax Message
Gadget
Gadget Tool
Integration Site
Integration Tool
Inventory
Inventory Module
Knowledge Box
Knowledge Pad
Knowledge Pad Module
Letter
Mail Message
Meeting
Meeting Module
Note
Notification Message
Notification Message Module
Payzen Event
Phone Call
Product
Product Module
Purchase Order
......@@ -49,7 +24,6 @@ Tax
Tax Module
Transformation
Transformation Module
Visit
Web Message
Web Page
Web Page 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