gitlab-org--gitlab-foss/spec/services/merge_requests
Douwe Maan 3bf34face4 Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security'
Replace issue access checks with use of IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

⚠️ - Potentially untested  
💣 - No test coverage  
🚥 - Test coverage of some sort exists (a test failed when error raised)  
🚦 - Test coverage of return value (a test failed when nil used)  
 - Permissions check tested

### Issue lookup with access check

Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells).

- [x] 🚦 app/finders/notes_finder.rb:15 [`visible_to_user`]
- [x] 🚥 app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`]
- [x]  app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`]
- [x]  lib/api/issues.rb:112 [`visible_to_user`]
  - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone
- [x]  lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too?
- [x]  lib/gitlab/search_results.rb:53 [`visible_to_user`]

### Previous discussions
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87

See merge request !2031
2016-11-28 21:26:23 -03:00
..
add_todo_when_build_fails_service_spec.rb Do not create TODO when build is allowed to fail 2016-11-21 13:30:24 +01:00
assign_issues_service_spec.rb Ignore external issues when bulk assigning issues to author of merge request. 2016-10-20 16:40:24 +02:00
build_service_spec.rb Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' 2016-11-28 21:26:23 -03:00
close_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
create_service_spec.rb
get_urls_service_spec.rb Use `Gitlab.config.gitlab.host` over `'localhost'` 2016-11-18 20:17:10 +08:00
merge_request_diff_cache_service_spec.rb Fix: Timeout creating and viewing merge request for binary file 2016-11-25 15:25:01 +02:00
merge_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
merge_when_build_succeeds_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
refresh_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
reopen_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
resolve_service_spec.rb Fix resolve service specs 2016-10-13 14:16:34 -05:00
resolved_discussion_notification_service.rb
update_service_spec.rb Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00