Skip to content

Allow IssuePolicy.can_read_confidential to be preloaded

Mario Celi requested to merge 377514-refactor-issue-policy into master

What does this MR do and why?

The IssueCollection class is very old and only used in the IssuePolicy class. This class does not use our redis cache for user max access on a project. This doesn't allow the max access to be preloaded for a list of projects (so we can avoid N+1 queries during policy checks). The change uses the cached issue policy reporter access check

This came up as part of !105036 (merged), but I have split it into this smaller MR to keep the other MR spec refactor only

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #377514 (closed)

Merge request reports