gitlab-org--gitlab-foss/spec/controllers/projects
Douwe Maan d1c94f034b Merge branch 'explicit-requesters-scope' into 'master'
Exclude requesters from Project#members, Group#members and User#members

## What does this MR do?

It excludes requesters from the `Project#members`, `Group#members` and `User#members` associations, and adds new `Project#requesters` and `Group#requesters` associations.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Without this, if you call `project.members`, requesters are included in the results! This is at best misleading, and at worst can lead to security issues. By excluding requesters from the `#members` associations, we avoid introducing security inadvertently since you have to call the `#requesters` association explicitly to get requesters.

## What are the relevant issue numbers?

This is something I realized while fixing the security issue #19102.

## Does this MR meet the acceptance criteria?

- [x] I don't think this needs a CHANGELOG since this is an internal change
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4946
2016-07-01 22:23:26 +00:00
..
avatars_controller_spec.rb Fix specs 2016-03-21 09:09:59 +01:00
blame_controller_spec.rb Move a few controller specs to their correct locations 2016-02-18 21:50:49 -05:00
blob_controller_spec.rb Validate presence of essential params for diff rendering 2016-06-24 16:20:53 -05:00
branches_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
commit_controller_spec.rb Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark 2016-06-12 07:36:25 -07:00
commits_controller_spec.rb Move a few controller specs to their correct locations 2016-02-18 21:50:49 -05:00
compare_controller_spec.rb Enable RSpec/NotToNot cop and auto-correct offenses 2016-05-24 15:40:29 -04:00
find_file_controller_spec.rb Merge branch 'master' of github.com:gitlabhq/gitlabhq 2016-01-07 12:56:18 +01:00
forks_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
group_links_controller_spec.rb Enable RSpec/NotToNot cop and auto-correct offenses 2016-05-24 15:40:29 -04:00
imports_controller_spec.rb Fix denting and spec 2016-03-13 13:44:31 +01:00
issues_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
labels_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
merge_requests_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
milestones_controller_spec.rb Fix spec that broke due to fact that iid is needed, not id, for MilestonesController 2015-12-05 00:04:44 -08:00
notes_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
project_members_controller_spec.rb Exclude requesters from Project#members, Group#members and User#members 2016-07-01 17:44:46 +02:00
protected_branches_controller_spec.rb
raw_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
refs_controller_spec.rb
repositories_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
services_controller_spec.rb
snippets_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
todo_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
tree_controller_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
uploads_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00