When a user has access to several organizations and those ones are implied in the same CourseProductRelation, when the user asks to download an archive of all contracts, he gets all contracts from all the organizations he has access to. Before the fix, only one parameter (CPR or Org) could be used for this endpoint. Now, the endpoint accepts both parameters CourseProductRelation UUID and Organization UUID. Finally, only the contracts that are attached to a specific organization are now archived.
Purpose
Allow the user (who has organization access) to get all archived contracts from a specific organization.
Proposal
Allow to parse 2 parameters with the endpoint to generate the archive of contracts. In the past, we only allowed one parameter at most, either the Organization UUID or the Course Product Relation UUID.
This PR will solve this issue
When a user has access to several organizations and those ones are implied in the same
CourseProductRelation
, when the user asks to download an archive of all contracts, he gets all contracts from all the organizations he has access to. Before the fix, only one parameter (CPR or Org) could be used for this endpoint. Now, the endpoint accepts both parametersCourseProductRelation
UUID andOrganization
UUID. Finally, only the contracts that are attached to a specific organization are now archived.Purpose
Allow the user (who has organization access) to get all archived contracts from a specific organization.
Proposal
Allow to parse 2 parameters with the endpoint to generate the archive of contracts. In the past, we only allowed one parameter at most, either the Organization UUID or the Course Product Relation UUID.
[x] Find the bug
[x] Make a test to fix the bug