...
- TBD - This is a WIP and is subject to change.
- funds can be associated with one or more acquisitions units via the assignment APIs. This indicates the acquisitions unit(s) for the fund.
- The general approach is very similar to that of orders...
- For search, we're inserting a prefix to queries
- For get by id, we're retrieving the record from storage, and then making a decision on whether to return it the user or not
- For put/post also work the same way
- A new schema needs to be introduced which combines fund and an acquisitionUnits field containing an array of acquisition unit UUIDs.
- This will be used in POST/PUT and can be phased into the GET APIs
- The business logic layer (not implemented yet) will be responsible for making calls to both finance-storage.funds and finance-storage.acquisitions-unit-assignments APIs
- Views will need to be created in the storage module and will be used when querying funds.
- Join the fund and acqUnitAssignments tables on fund.id == recordId (Requires DISTINCT ON)
Fund Use Cases
Acq. Unit | protectCreate | protectRead | protectUpdate | protectDelete |
---|---|---|---|---|
FundAllowFundViewAcqUnit | false | false | true | true |
RestrictFundViewAcqUnit | true | true | false | true |
Effective | false | false | false | true |
Fund | AcqUnits |
---|---|
FundRistrictView1 | RestrictFundViewAcqUnit |
FundRistrictView2 | RestrictFundViewAcqUnit, FundAllowFundViewAcqUnit |
FundAllowView | FundAllowFundViewAcqUnit |
FundWithoutAcqUnits |
Fund view
1. Scenario - Show funds on Fund View
...
2. Scenario - Show funds on Fund View
- Given UserRestrictFundView user belongs to RestrictFundViewAcqUnit
- And "Fund View" opened
- When user select RestrictFundViewAcqUnit in the filter "Acquisition units"
- Then Only Fund(s) with acquisition unit RestrictFundViewAcqUnit are displayed (FundRistrictView1, FundRistrictView2)
...