Skip to content

Many endpoints use `project.{issues,merge_request}.{where,find}` without checking current user access to that feature

All of these should be using the {Issues,MergeRequest}Finder instead of project.{issues,merge_request}. Also prefer the finder over an explicit can?(current_user, :read_{issue,merge_request}, issuable) check, instead of in the IssuesController or MergeRequestController that have a before_action :authorize_read_{issue,merge_request}!

Added in the MR

  • app/models/concerns/milestoneish.rb:27
  • app/models/note.rb:121
  • lib/api/issues.rb:112 -> Discloses issuses which should be visible to Only team members
  • lib/api/helpers.rb:126
  • lib/gitlab/search_results.rb:53
  • see MR for more

/cc @felipe_artur