Ability#issues_readable_by_user is a code smell
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Mentioned in https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024#note_89779:
Douwe Maan (@douwe):
Ability#issues_readable_by_user is definitely a smell, but I'm not sure how we'd get rid of it since it works on an array, not a relation :/ Potentially we could rewrite it to use the IssuesFinder with where(id: issues.map(&:id).pluck(:id), and only return those issues in the issues array that have their ID in the result of that query, but that may be less performant. Would be worth a try though.
Edited by 🤖 GitLab Bot 🤖