Extract authz classes to fetch permitted abilities
What does this MR do and why?
This change introduces a refactoring that delegates to the ::Authz::Project
class for preloading projects and filtering the results down to projects that the current user is authorized to access. This change was originally merged in !156840 (merged) but it was reverted in !159621 (merged). This MR restores a portion of the code from that MR that isn't in the critical path.
I have not included SQL query plans because none of the SQL queries have changed nor have the # of places where these queries are executed.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by mo khan