• Jérome Perrin's avatar
    ERP5Type: don't publish workflow methods · f4338e7e
    Jérome Perrin authored
    Wrapping a method in a workflow method should not change the
    publishable state the method.
    If the original method is not publishable, wrapping it in a workflow
    method should not make it publishable.  If the original method is
    publishable, then the wrapped method should still be publishable.
    
    This was always intended to work like this, as we can see in the code
    comment in `WorkflowMethod.__init__` but was not properly tested and got
    broken at some point.
    
    It's important to restore the behavior, because workflow methods such as
    `validate` should not be published, users must only be able to use the
    user interface transitions freely, workflow methods transitions are
    only available if developer expose them in a script - and perform the
    necessary consistency and security checks in that script.
    f4338e7e
testInteractionWorkflow.py 29 KB