diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_model_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_model_module.xml index 204fe93b6f5bab9cbbba749424d909a3536edab1..6fab62bc2fe5a5dad77e6d0a78dd04268f3fa7c3 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_model_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_model_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-MEMBER'> <item>Auditor</item> <item>Author</item> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_module.xml index 867b236c2a575e26b3679ac8da0d34b568225216..7cac6c3ee69329d46d3927871d27ee2f3d623dff 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-COMPUTER'> <item>Auditor</item> </role> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_network_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_network_module.xml index fbcde1024f27c564c410a0b900c31a73096317c1..85941337f7d7158abb7fb1153fd8a98214434587 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_network_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/computer_network_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-MEMBER'> <item>Auditor</item> <item>Author</item> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/credential_update_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/credential_update_module.xml index 204fe93b6f5bab9cbbba749424d909a3536edab1..6fab62bc2fe5a5dad77e6d0a78dd04268f3fa7c3 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/credential_update_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/credential_update_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-MEMBER'> <item>Auditor</item> <item>Author</item> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/data_set_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/data_set_module.xml index 06ba041ba1912696ae63209f4fedd27ab0b2896a..3d8de58900f1209599eff449deefb2f4693b92f7 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/data_set_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/data_set_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-COMPUTER'> <item>Author</item> </role> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml index 25ba09601839e2f49bb7153eb39d91229f1fe40c..5274dc14c15978c6ce4de5534389d9d5a3ab3ca5 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml @@ -1,5 +1,9 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-COMPUTER'> <item>Auditor</item> </role> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml index c02682e489cfc367bec235bf6e44e037a85f2f33..2e1403945f13914a5e77d444e54e7b364b314203 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations.xml @@ -3,6 +3,10 @@ <role id='ERP5TypeTestCase'> <item>Owner</item> </role> + <role id='G-COMPANY'> + <item>Auditor</item> + <item>Author</item> + </role> <role id='R-SHADOW-PERSON'> <item>Auditor</item> </role> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml index 666d80647d6c14b864ab3cc14656ac48bf555850..98fc369332fbf4ae128bbd816878376e5d42527c 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/portal_integrations/slapos_payzen_test_integration.xml @@ -1,5 +1,8 @@ <local_roles_item> <local_roles> + <role id='G-COMPANY'> + <item>Assignor</item> + </role> <role id='R-SHADOW-PERSON'> <item>Auditor</item> <item>Author</item> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_order_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_order_module.xml index f5e7389b7f43e66cbae556319856391052202c24..df658de14e267092b5f189e91d245895741d9656 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_order_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_order_module.xml @@ -4,7 +4,7 @@ <item>Auditor</item> <item>Author</item> </role> - <role id='admin'> + <role id='zope'> <item>Owner</item> </role> </local_roles> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_packing_list_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_packing_list_module.xml index f5e7389b7f43e66cbae556319856391052202c24..df658de14e267092b5f189e91d245895741d9656 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_packing_list_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_packing_list_module.xml @@ -4,7 +4,7 @@ <item>Auditor</item> <item>Author</item> </role> - <role id='admin'> + <role id='zope'> <item>Owner</item> </role> </local_roles> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_trade_condition_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_trade_condition_module.xml index f5e7389b7f43e66cbae556319856391052202c24..df658de14e267092b5f189e91d245895741d9656 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_trade_condition_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/sale_trade_condition_module.xml @@ -4,7 +4,7 @@ <item>Auditor</item> <item>Author</item> </role> - <role id='admin'> + <role id='zope'> <item>Owner</item> </role> </local_roles> diff --git a/master/bt5/slapos_erp5/LocalRolesTemplateItem/system_event_module.xml b/master/bt5/slapos_erp5/LocalRolesTemplateItem/system_event_module.xml index ade20c50c9652b7edd040a4a3ffebb10667f87b4..6d21ba5486faac1a3364db849f267de879b9845f 100644 --- a/master/bt5/slapos_erp5/LocalRolesTemplateItem/system_event_module.xml +++ b/master/bt5/slapos_erp5/LocalRolesTemplateItem/system_event_module.xml @@ -1,8 +1,5 @@ <local_roles_item> <local_roles> - <role id='ERP5TypeTestCase'> - <item>Owner</item> - </role> <role id='G-COMPANY'> <item>Auditor</item> <item>Author</item> @@ -10,5 +7,8 @@ <role id='R-SHADOW-PERSON'> <item>Author</item> </role> + <role id='zope'> + <item>Owner</item> + </role> </local_roles> </local_roles_item> \ No newline at end of file diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Model%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Model%20Module.xml index 9401d0e8f527e07ed8e58bc74186b17488b51ef4..98f3ca94587f0b19a3145816b564d029819f0d57 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Model%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Model%20Module.xml @@ -1,4 +1,9 @@ <type_roles> + <role id='Auditor; Author'> + <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; Author'> <property id='title'>Member</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Module.xml index bcfadc427c8d933424f932e8b2e74bc878a2dbc0..76b3bde27855958258e8146c0ce25999c4927f81 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Module.xml @@ -4,6 +4,11 @@ <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; Author'> <property id='title'>Member</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Network%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Network%20Module.xml index 894f34c0bdd8cb08d64dfcfa2b9298bc5ecadb2a..1a6fe7c5fbaa8cf554b08d71d383341af7b07b39 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Network%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Computer%20Network%20Module.xml @@ -1,4 +1,9 @@ <type_roles> + <role id='Auditor; Author'> + <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; Author'> <property id='title'>Member</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Credential%20Update%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Credential%20Update%20Module.xml index 9401d0e8f527e07ed8e58bc74186b17488b51ef4..1031a308c9ed9c50d106638cc354ebb4ec8bc1da 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Credential%20Update%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Credential%20Update%20Module.xml @@ -1,4 +1,9 @@ <type_roles> + <role id='Auditor; Author'> + <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; Author'> <property id='title'>Member</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set%20Module.xml index 68f82943f8a2dabb61cbf9fa14608a155049135c..c2da5ae811c91bc2929231d4a255a49a0cbd5d1a 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set%20Module.xml @@ -1,4 +1,9 @@ <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> <role id='Author'> <property id='title'>Security for Shacache (Author)</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set.xml index e6cef8b023db97ae46d9119fe3eedd32f7596bdc..3ed94c32b6a11eede3c50065b852758e92208b49 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Data%20Set.xml @@ -1,4 +1,9 @@ <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> <role id='Auditor'> <property id='title'>Security for Shacache (Auditor)</property> <multi_property id='category'>role/member</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml index fa44835a93b92f20bb0785a65053608939fe3315..3e4b7bed2f20384b3ba48139314dc95b7dfa6976 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml @@ -4,6 +4,11 @@ <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> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml index fcaeb22708f7c34360f43e353bab5bc5b5902f19..a53ba99a3915883a71b8a7f0c2da5f5003e906a2 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml @@ -4,6 +4,11 @@ <property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property> <multi_property id='base_category'>destination_section</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='Assignor'> <property id='title'>Related Software Instance Group</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromSelf</property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml index 036055cb22ec89753facfdc4af47a2c2953b3747..9272335b0ebcd6f3416eede052030e4c9ed8741a 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Site.xml @@ -1,4 +1,9 @@ <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> <role id='Auditor; Author'> <property id='title'>Person Shadow</property> <multi_property id='category'>role/shadow/person</multi_property> diff --git a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml index 7d3f924698b3625826758ce0206e388a4dd7e30c..522d14e6fdc478e3d65150e78d0621698f68e686 100644 --- a/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml +++ b/master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Integration%20Tool.xml @@ -1,4 +1,9 @@ <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> <role id='Auditor'> <property id='title'>Person Shadow</property> <multi_property id='category'>role/shadow/person</multi_property> diff --git a/master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py b/master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py index 484fdbda9cca7ea831f3cd72b8b75ea0c246d8cd..648b7400ead4294a0cf3e99d3953ef223bd154dd 100644 --- a/master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py +++ b/master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py @@ -147,16 +147,19 @@ class TestComputerModelModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.computer_model_module self.assertSecurityGroup(module, - ['R-MEMBER', 'zope'], False) + ['G-COMPANY', 'R-MEMBER', 'zope'], False) self.assertRoles(module, 'R-MEMBER', ['Auditor', 'Author']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'zope', ['Owner']) class TestComputerModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.computer_module self.assertSecurityGroup(module, - ['R-COMPUTER', 'R-MEMBER', 'R-SHADOW-PERSON', 'zope'], False) + ['G-COMPANY', 'R-COMPUTER', 'R-MEMBER', 'R-SHADOW-PERSON', 'zope'], + False) self.assertRoles(module, 'R-MEMBER', ['Auditor', 'Author']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'R-COMPUTER', ['Auditor']) self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor']) self.assertRoles(module, 'zope', ['Owner']) @@ -191,8 +194,9 @@ class TestComputerNetworkModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.computer_network_module self.assertSecurityGroup(module, - ['R-MEMBER', 'R-SHADOW-PERSON', 'zope'], False) + ['G-COMPANY', 'R-MEMBER', 'R-SHADOW-PERSON', 'zope'], False) self.assertRoles(module, 'R-MEMBER', ['Auditor', 'Author']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor']) self.assertRoles(module, 'zope', ['Owner']) @@ -250,30 +254,34 @@ class TestCredentialUpdateModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.credential_update_module self.assertSecurityGroup(module, - ['zope', 'R-MEMBER'], False) + ['zope', 'R-MEMBER', 'G-COMPANY'], False) self.assertRoles(module, 'R-MEMBER', ['Auditor', 'Author']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'zope', ['Owner']) class TestDataSet(TestSlapOSGroupRoleSecurityMixin): - def test_AnyFromShadirGroup(self): + def test(self): data_set = self.portal.data_set_module.newContent(portal_type='Data Set') data_set.updateLocalRolesOnSecurityGroups() self.assertSecurityGroup(data_set, - [self.user_id, 'R-COMPUTER', 'R-INSTANCE', 'R-MEMBER'], False) + [self.user_id, 'G-COMPANY', 'R-COMPUTER', 'R-INSTANCE', 'R-MEMBER'], + False) self.assertRoles(data_set, 'R-COMPUTER', ['Auditor']) self.assertRoles(data_set, 'R-INSTANCE', ['Auditor']) self.assertRoles(data_set, 'R-MEMBER', ['Auditor']) + self.assertRoles(data_set, 'G-COMPANY', ['Assignor']) self.assertRoles(data_set, self.user_id, ['Owner']) class TestDataSetModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.data_set_module self.assertSecurityGroup(module, - ['R-COMPUTER', 'R-INSTANCE', 'R-MEMBER', 'zope'], False) + ['G-COMPANY', 'R-COMPUTER', 'R-INSTANCE', 'R-MEMBER', 'zope'], False) self.assertRoles(module, 'R-COMPUTER', ['Author']) self.assertRoles(module, 'R-INSTANCE', ['Author']) self.assertRoles(module, 'R-MEMBER', ['Author']) + self.assertRoles(module, 'G-COMPANY', ['Author', 'Auditor']) self.assertRoles(module, 'zope', ['Owner']) class TestDocumentModule(TestSlapOSGroupRoleSecurityMixin): @@ -326,9 +334,11 @@ class TestHostingSubscription(TestSlapOSGroupRoleSecurityMixin): portal_type='Hosting Subscription', reference=reference) subscription.updateLocalRolesOnSecurityGroups() - self.assertSecurityGroup(subscription, [self.user_id, reference], False) + self.assertSecurityGroup(subscription, [self.user_id, reference, + 'G-COMPANY'], False) self.assertRoles(subscription, reference, ['Assignor']) self.assertRoles(subscription, self.user_id, ['Owner']) + self.assertRoles(subscription, 'G-COMPANY', ['Assignor']) def test_CustomOfTheHostingSubscription(self): customer_reference = 'TESTPERSON-%s' % self.generateNewId() @@ -341,19 +351,21 @@ class TestHostingSubscription(TestSlapOSGroupRoleSecurityMixin): subscription.updateLocalRolesOnSecurityGroups() self.assertSecurityGroup(subscription, [self.user_id, reference, - customer_reference], False) + customer_reference, 'G-COMPANY'], False) self.assertRoles(subscription, reference, ['Assignor']) self.assertRoles(subscription, customer_reference, ['Assignee']) self.assertRoles(subscription, self.user_id, ['Owner']) + self.assertRoles(subscription, 'G-COMPANY', ['Assignor']) class TestHostingSubscriptionModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.hosting_subscription_module self.assertSecurityGroup(module, - ['R-COMPUTER', 'R-MEMBER', 'R-INSTANCE', 'zope'], False) + ['G-COMPANY', 'R-COMPUTER', 'R-MEMBER', 'R-INSTANCE', 'zope'], False) self.assertRoles(module, 'R-MEMBER', ['Auditor', 'Author']) self.assertRoles(module, 'R-COMPUTER', ['Auditor']) self.assertRoles(module, 'R-INSTANCE', ['Auditor']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'zope', ['Owner']) class TestImage(TestSlapOSGroupRoleSecurityMixin): @@ -776,9 +788,9 @@ class TestSaleOrderModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.sale_order_module self.assertSecurityGroup(module, - ['G-COMPANY', 'admin'], True) + ['G-COMPANY', 'zope'], True) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) - self.assertRoles(module, 'admin', ['Owner']) + self.assertRoles(module, 'zope', ['Owner']) class TestSaleOrder(TestSlapOSGroupRoleSecurityMixin): def test_GroupCompany(self): @@ -794,9 +806,9 @@ class TestSalePackingListModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.sale_packing_list_module self.assertSecurityGroup(module, - ['G-COMPANY', 'admin'], False) + ['G-COMPANY', 'zope'], False) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) - self.assertRoles(module, 'admin', ['Owner']) + self.assertRoles(module, 'zope', ['Owner']) class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin): def test_GroupCompany(self): @@ -946,9 +958,9 @@ class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.sale_trade_condition_module self.assertSecurityGroup(module, - ['G-COMPANY', 'admin'], False) + ['G-COMPANY', 'zope'], False) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) - self.assertRoles(module, 'admin', ['Owner']) + self.assertRoles(module, 'zope', ['Owner']) class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin): def test_GroupCompany(self): @@ -1405,8 +1417,9 @@ class TestIntegrationTool(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.portal_integrations self.assertSecurityGroup(module, - ['R-SHADOW-PERSON', 'ERP5TypeTestCase'], False) + ['R-SHADOW-PERSON', 'ERP5TypeTestCase', 'G-COMPANY'], False) self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor']) + self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'ERP5TypeTestCase', ['Owner']) class TestIntegrationSite(TestSlapOSGroupRoleSecurityMixin): @@ -1415,18 +1428,19 @@ class TestIntegrationSite(TestSlapOSGroupRoleSecurityMixin): product = module.newContent( portal_type='Integration Site') self.assertSecurityGroup(product, - ['R-SHADOW-PERSON', self.user_id], False) + ['R-SHADOW-PERSON', self.user_id, 'G-COMPANY'], False) self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor', 'Author']) + self.assertRoles(product, 'G-COMPANY', ['Assignor']) self.assertRoles(product, self.user_id, ['Owner']) class TestSystemEventModule(TestSlapOSGroupRoleSecurityMixin): def test(self): module = self.portal.system_event_module self.assertSecurityGroup(module, - ['R-SHADOW-PERSON', 'ERP5TypeTestCase', 'G-COMPANY'], False) + ['R-SHADOW-PERSON', 'zope', 'G-COMPANY'], False) self.assertRoles(module, 'R-SHADOW-PERSON', ['Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) - self.assertRoles(module, 'ERP5TypeTestCase', ['Owner']) + self.assertRoles(module, 'zope', ['Owner']) class TestPayzenEvent(TestSlapOSGroupRoleSecurityMixin): def test_GroupCompany(self): diff --git a/master/bt5/slapos_erp5/bt/revision b/master/bt5/slapos_erp5/bt/revision index aca544d017fda52bacd14eecff279d5097137c6e..bc768da71aa51e6697be661827eee8604e06de95 100644 --- a/master/bt5/slapos_erp5/bt/revision +++ b/master/bt5/slapos_erp5/bt/revision @@ -1 +1 @@ -145 \ No newline at end of file +146 \ No newline at end of file