To avoid the situation where the organization has not set any owner members, it causes the contract to have only the student to sign the document where we actually need the signature of both parties. The problem is that if the organization does not have at least one owner, the signature procedure will be created with only 1 signature required. We need two signatures, one from the student and one from the organization to make the contract valid.
To avoid this issue in the future, we've added a new method that will verify if there is one user with the role 'owner' for the organization that is attached to the order.
Purpose
Prevent having a contract that is set as fully signed, but it has only been signed by the student. We must have both parties, the student and at least one of the owners of the organization attached to the order.
Proposal
Create a util method where we will check if there is still at least 1 owner for the organization that is attached to the order's organization.
[x] create util method to check the presence of an owner from the organization eligible to sign a contract.
[x] block the creation of submitting for signature the contract if the organization has not set owner members.
This PR solves this issue
To avoid the situation where the organization has not set any owner members, it causes the contract to have only the student to sign the document where we actually need the signature of both parties. The problem is that if the organization does not have at least one owner, the signature procedure will be created with only 1 signature required. We need two signatures, one from the student and one from the organization to make the contract valid.
To avoid this issue in the future, we've added a new method that will verify if there is one user with the role 'owner' for the organization that is attached to the order.
Purpose
Prevent having a contract that is set as fully signed, but it has only been signed by the student. We must have both parties, the student and at least one of the owners of the organization attached to the order.
Proposal
Create a util method where we will check if there is still at least 1 owner for the organization that is attached to the order's organization.