Fixes #3892. This solution was a bit unruly (especially ugly after linting) but it seemed like the logical approach without refactoring the whole visibility_for to be a normal method rather than a class method. This fix evaluates if the partner/reviewer is the author of the source submission first before evaluating the their role. The reviewer role was also lumped in here because even though I know we advise against a reviewer also being an applicant, it still could happen without oversight.
I tried to keep the code as clean as I could and reuse QuerySets, but let me know if y'all see any way I can optimize!
Test Steps
[ ] Follow the same test steps as #3744, but ensure the partner user also has the role of Applicant
Only steps regarding the partner account's visibility need to be followed
Fixes #3892. This solution was a bit unruly (especially ugly after linting) but it seemed like the logical approach without refactoring the whole
visibility_for
to be a normal method rather than a class method. This fix evaluates if the partner/reviewer is the author of the source submission first before evaluating the their role. The reviewer role was also lumped in here because even though I know we advise against a reviewer also being an applicant, it still could happen without oversight.I tried to keep the code as clean as I could and reuse QuerySets, but let me know if y'all see any way I can optimize!
Test Steps
Applicant