Commit 4bba1b8d authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test: sale agent/manager can access Events

parent 9bb6cb63
......@@ -541,8 +541,10 @@ class TestMailMessage(TestSlapOSGroupRoleSecurityMixin):
product = self.portal.event_module.newContent(
portal_type=self.event_portal_type)
self.assertSecurityGroup(product,
[self.user_id], False)
[self.user_id, 'F-SALEAGT', 'F-SALEMAN'], False)
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, 'F-SALEMAN', ['Assignor'])
self.assertRoles(product, 'F-SALEAGT', ['Assignee'])
def test_SourceCustomer(self):
reference = 'TESTPERSON-%s' % self.generateNewId()
......@@ -554,9 +556,11 @@ class TestMailMessage(TestSlapOSGroupRoleSecurityMixin):
source_value=person,
)
self.assertSecurityGroup(product,
[person.getUserId(), self.user_id], False)
[person.getUserId(), self.user_id, 'F-SALEAGT', 'F-SALEMAN'], False)
self.assertRoles(product, person.getUserId(), ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, 'F-SALEMAN', ['Assignor'])
self.assertRoles(product, 'F-SALEAGT', ['Assignee'])
def test_DestinationCustomer(self):
reference = 'TESTPERSON-%s' % self.generateNewId()
......@@ -568,9 +572,11 @@ class TestMailMessage(TestSlapOSGroupRoleSecurityMixin):
destination_value=person,
)
self.assertSecurityGroup(product,
[person.getUserId(), self.user_id], False)
[person.getUserId(), self.user_id, 'F-SALEAGT', 'F-SALEMAN'], False)
self.assertRoles(product, person.getUserId(), ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
self.assertRoles(product, 'F-SALEMAN', ['Assignor'])
self.assertRoles(product, 'F-SALEAGT', ['Assignee'])
def test_SourceProject(self):
project = self.addProject()
......
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