Commit 93682b4a authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: nobody have to access Hosting Subscription for now

parent 9733b409
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='F-CUSTOMER'>
<item>Auditor</item>
</role>
<role id='F-PRODUCTION*'>
<item>Auditor</item>
</role>
</local_roles> </local_roles>
<local_role_group_ids>
<local_role_group_id id='function'>
<principal id='F-CUSTOMER'>Auditor</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item> </local_roles_item>
\ No newline at end of file
<type_roles> <type_roles>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/customer</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Production</property>
<multi_property id='category'>function/production*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
<type_roles> <type_roles>
<role id='Auditor'>
<property id='title'>Project Production Agent</property>
<property id='description'>XXX add local role group</property>
<property id='condition'>python: context.getFollowUp("") != ""</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='category'>function/production/agent</multi_property>
<multi_property id='base_category'>follow_up</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Project Production Manager</property>
<property id='description'>XXX add local role group</property>
<property id='condition'>python: context.getFollowUp("") != ""</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='category'>function/production/manager</multi_property>
<multi_property id='base_category'>follow_up</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -1355,3 +1355,20 @@ class TestProject(TestSlapOSGroupRoleSecurityMixin): ...@@ -1355,3 +1355,20 @@ class TestProject(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(project, 'F-ACCOUNTING*', ['Auditor']) self.assertRoles(project, 'F-ACCOUNTING*', ['Auditor'])
self.assertRoles(project, project.getReference(), ['Auditor']) self.assertRoles(project, project.getReference(), ['Auditor'])
class TestHostingSubscriptionModule(TestSlapOSGroupRoleSecurityMixin):
def test_HostingSubscriptionModule(self):
module = self.portal.hosting_subscription_module
self.assertSecurityGroup(module,
[module.Base_getOwnerId()], False)
self.assertRoles(module, module.Base_getOwnerId(), ['Owner'])
class TestHostingSubscription(TestSlapOSGroupRoleSecurityMixin):
def test_HostingSubscription_default(self):
hosting_subscription = self.portal.hosting_subscription_module.newContent(
portal_type='Hosting Subscription')
self.assertSecurityGroup(hosting_subscription,
[self.user_id], False)
self.assertRoles(hosting_subscription, self.user_id, ['Owner'])
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