Commit d15b1592 authored by Jérome Perrin's avatar Jérome Perrin

testSecurity: add a mechanism to ignore some workflows in test_workflow_transition_protection

On some technical workflows, it can be OK to have some transitions
without protection
parent eed03565
......@@ -41,6 +41,8 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
# return (...)
class TestSecurityMixin(ERP5TypeTestCase):
workflow_transition_protection_ignored_workflow_id_list = (
)
def _prepareDocumentList(self):
if getattr(self, '_prepareDocumentList_finished', None):
......@@ -114,6 +116,8 @@ class TestSecurityMixin(ERP5TypeTestCase):
"""
error_list = []
for wf in self.portal.portal_workflow.objectValues():
if wf.getId() in self.workflow_transition_protection_ignored_workflow_id_list:
continue
if wf.__class__.__name__ in ['InteractionWorkflowDefinition', 'Interaction Workflow']:
continue
for transition in wf.getTransitionValueList():
......
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