Commit 4468c60d authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: fix Accounting Period security

parent a7d72f2d
<type_roles>
<role id='Assignee'>
<property id='title'>Accountant Agent</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting/agent</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Accountant</property>
<property id='title'>Accountant Manager</property>
<property id='description'>Only the accountant can validate new accounts.</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting</multi_property>
<multi_property id='category'>function/accounting/manager</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -1502,14 +1502,15 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountingPeriod(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
def test_AccountingFunction(self):
product = self.portal.organisation_module.newContent(
portal_type='Organisation').newContent(
portal_type='Accounting Period')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
['F-ACCMAN', 'F-ACCAGT', self.user_id], False)
self.assertRoles(product, 'F-ACCMAN', ['Assignor'])
self.assertRoles(product, 'F-ACCAGT', ['Assignee'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestAcknowledgement(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