In our system, we have two separate companies, each with access limited to their assigned records. While this restriction works correctly when viewing individual records, a problem arises when generating PDF reports. When generating a PDF report that includes a table of multiple records, both companies can see records that belong to the other company. This violates the intended access control rules, as each company should only be able to see its own records, even in generated reports.
Entity A is linked to Entity B in a one-to-many relationship. All companies can access Entity A, but they should only see the B records that are specifically assigned to them. When displaying the B records, I use an iterative process (each). However, there is an issue where the companies can see B records that are not assigned to them.
Comment