Commit 1f049470 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Shadown Person is auditor on Cloud Contracts

    This allows we calculate Outstanting Amout on subscription process (when user order from website)
parent 7a07c1fe
......@@ -12,4 +12,10 @@
<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='categories'>local_role_group/shadow</multi_property>
<multi_property id='category'>role/shadow/person</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -2298,9 +2298,10 @@ class TestCloudContract(TestSlapOSGroupRoleSecurityMixin):
portal_type='Cloud Contract')
self.assertSecurityGroup(contract,
['G-COMPANY', self.user_id],
['G-COMPANY', 'R-SHADOW-PERSON', self.user_id],
False)
self.assertRoles(contract, 'G-COMPANY', ['Assignor'])
self.assertRoles(contract, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(contract, self.user_id, ['Owner'])
def test_Customer(self):
......@@ -2309,9 +2310,10 @@ class TestCloudContract(TestSlapOSGroupRoleSecurityMixin):
reference=reference)
contract = person.Person_generateCloudContract(batch=True)
self.assertSecurityGroup(contract,
['G-COMPANY', person.getUserId(), self.user_id], False)
['G-COMPANY', person.getUserId(), 'R-SHADOW-PERSON', self.user_id], False)
self.assertRoles(contract, 'G-COMPANY', ['Assignor'])
self.assertRoles(contract, person.getUserId(), ['Auditor'])
self.assertRoles(contract, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(contract, self.user_id, ['Owner'])
class TestUpgradeDecisionModule(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