Commit 26776c96 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: Software Instances must access Remote Node for the API

parent 4f0a54f9
......@@ -26,4 +26,12 @@
<multi_property id='category'>function/production/manager</multi_property>
<multi_property id='base_category'>follow_up</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Software Instance</property>
<property id='condition'>python: context.getFollowUp("") != ""</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='categories'>local_role_group/project</multi_property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>follow_up</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -505,11 +505,13 @@ class TestRemoteNode(TestSlapOSGroupRoleSecurityMixin):
'%s_F-PRODAGNT' % project.getReference(),
'%s_F-PRODMAN' % project.getReference(),
'%s_F-CUSTOMER' % project.getReference(),
'%s_R-INSTANCE' % project.getReference(),
], False)
self.assertRoles(compute_node, self.user_id, ['Owner'])
self.assertRoles(compute_node, '%s_F-PRODAGNT' % project.getReference(), ['Assignee'])
self.assertRoles(compute_node, '%s_F-PRODMAN' % project.getReference(), ['Assignor'])
self.assertRoles(compute_node, '%s_F-CUSTOMER' % project.getReference(), ['Auditor'])
self.assertRoles(compute_node, '%s_R-INSTANCE' % project.getReference(), ['Auditor'])
class TestComputerModelModule(TestSlapOSGroupRoleSecurityMixin):
......
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