Commit e74c386f authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: Software Instances must access Remote Node for the API

parent ada06c33
...@@ -26,4 +26,12 @@ ...@@ -26,4 +26,12 @@
<multi_property id='category'>function/production/manager</multi_property> <multi_property id='category'>function/production/manager</multi_property>
<multi_property id='base_category'>follow_up</multi_property> <multi_property id='base_category'>follow_up</multi_property>
</role> </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> </type_roles>
\ No newline at end of file
...@@ -505,11 +505,13 @@ class TestRemoteNode(TestSlapOSGroupRoleSecurityMixin): ...@@ -505,11 +505,13 @@ class TestRemoteNode(TestSlapOSGroupRoleSecurityMixin):
'%s_F-PRODAGNT' % project.getReference(), '%s_F-PRODAGNT' % project.getReference(),
'%s_F-PRODMAN' % project.getReference(), '%s_F-PRODMAN' % project.getReference(),
'%s_F-CUSTOMER' % project.getReference(), '%s_F-CUSTOMER' % project.getReference(),
'%s_R-INSTANCE' % project.getReference(),
], False) ], False)
self.assertRoles(compute_node, self.user_id, ['Owner']) self.assertRoles(compute_node, self.user_id, ['Owner'])
self.assertRoles(compute_node, '%s_F-PRODAGNT' % project.getReference(), ['Assignee']) 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-PRODMAN' % project.getReference(), ['Assignor'])
self.assertRoles(compute_node, '%s_F-CUSTOMER' % project.getReference(), ['Auditor']) self.assertRoles(compute_node, '%s_F-CUSTOMER' % project.getReference(), ['Auditor'])
self.assertRoles(compute_node, '%s_R-INSTANCE' % project.getReference(), ['Auditor'])
class TestComputerModelModule(TestSlapOSGroupRoleSecurityMixin): 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