openfun / joanie

👛 A headless ERP for education to manage course enrollment/subscription, payment and certificates delivery.
MIT License
22 stars 2 forks source link

Signature - Prevent to sign a document when signatories are missing #713

Closed jbpenrath closed 6 months ago

jbpenrath commented 6 months ago

Bug Report

Problematic behavior Currently, a workflow to sign a contract can be created even if an organization has no signatory (owner). This is weird as in this case when the user sign its contract, as the Signature provider attempts only one signature, the workflow is finished once the student has signed. So a workflowFinished is send and our current logic consider that the organization has signed when we receive this event.

Expected behavior/code If an organization implied into a contract signature process, the signature process should be prevented.

Furthermore, should we use the event workflowFinished to consider that an organization sign a contract ?

Additional context/Screenshots