Improve SQL query used in Issues and Merge Requests dashboards
Currently we're obtaining the issues/MRs related the the projects where user is authorized plus all the projects that are public or internal.
Instead of doing that we should only include projects where user has been authorized plus all the projects that the user has interacted with (Assigning or mentioning a user will generate a new record in the user_interacted_projects
table).
Reference: https://gitlab.com/gitlab-org/gitlab-ce/issues/43561#note_89644902
Edited by Rubén Dávila