Multiple supplies feature has been implemented as part of OLMIS-5142 and after first checks, I found out that there is a problem with correct displaying requisitions for certain users. Currently, both regular and partner users can see both requisitions on the list and they have access to those requisitions because both users/requisitions have the same facilities and programs.
Currently, there are three types of rights in the system:
- General right, which contains only the right name
- Fulfillment right, which contains the right name and warehouse id
- supervision right, which contains the right name, facility id and program id
The only difference between regular and partner users is the supervisory node and I think its ID should be inside supervision rights. The id is required only for requisition rights so eventually, we could create a new type of rights similar to supervision right but with supervisory node id.
Also, because of that change, a supervisory node field in each requisition would need to be set when the requisition is initiated and because of that, we would need to create a cross-service migration for existing requisitions.
This is my first thoughts about how to solve the issue so I know that maybe the solution is not the best.
What are your thoughts about it?