Commit 3912a2c7 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use strict security.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18497 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4085ba8a
...@@ -93,6 +93,18 @@ class TestTaskReportDivergenceMixin(TestTaskMixin): ...@@ -93,6 +93,18 @@ class TestTaskReportDivergenceMixin(TestTaskMixin):
task_report = sequence.get('task_report') task_report = sequence.get('task_report')
task_report.edit(start_date=self.datetime + 15) task_report.edit(start_date=self.datetime + 15)
def stepSetStrictSecurity(self, sequence=None, sequence_list=None, **kw):
portal = self.getPortal()
simulation_tool = portal.portal_simulation
rule_tool = portal.portal_rules
uf = self.getPortal().acl_users
if not uf.getUser('manager'):
uf._doAddUser('manager', '', ['Manager'], [])
self.login('manager')
simulation_tool.Base_setDefaultSecurity()
rule_tool.Base_setDefaultSecurity()
self.logout()
class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) : class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) :
run_all_test = 1 run_all_test = 1
...@@ -120,7 +132,10 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) ...@@ -120,7 +132,10 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase)
if not run: return if not run: return
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.default_task_sequence + '\ sequence_string = '\
stepSetStrictSecurity \
' + \
self.default_task_sequence + '\
stepCheckTaskReportIsSolved \ stepCheckTaskReportIsSolved \
stepChangeTaskReportLineQuantity \ stepChangeTaskReportLineQuantity \
stepCheckTaskReportIsCalculating \ stepCheckTaskReportIsCalculating \
...@@ -140,6 +155,7 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) ...@@ -140,6 +155,7 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase)
# Test with a simply order without cell # Test with a simply order without cell
sequence_string = '\ sequence_string = '\
stepSetStrictSecurity \
stepLogin \ stepLogin \
stepCreateOrganisation ' + \ stepCreateOrganisation ' + \
self.default_task_sequence + '\ self.default_task_sequence + '\
...@@ -161,7 +177,9 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) ...@@ -161,7 +177,9 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase)
sequence_list = SequenceList() sequence_list = SequenceList()
# Test with a simply order without cell # Test with a simply order without cell
sequence_string = self.default_task_sequence + '\ sequence_string = '\
stepSetStrictSecurity \
' + self.default_task_sequence + '\
stepCheckTaskReportIsSolved \ stepCheckTaskReportIsSolved \
stepChangeTaskReportStartDate \ stepChangeTaskReportStartDate \
stepCheckTaskReportIsCalculating \ stepCheckTaskReportIsCalculating \
......
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