diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-09-30 07:52:43 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-09-30 07:52:43 +0000 |
commit | db00b495d2099e869f50694a0c156632e5b77561 (patch) | |
tree | 031ef1b3aa985ccfbc1f0f1165f50bfe6fa800ca /lib/api | |
parent | 80fef70bb7c9c1cab1ff80e78f94a83d6712e50d (diff) | |
parent | 486f755c4fc3606df3c6cfc24412a9e7d02d9e36 (diff) | |
download | gitlab-ce-db00b495d2099e869f50694a0c156632e5b77561.tar.gz |
Merge branch 'rc-new-access-requests-finder' into 'master'
New `AccessRequestsFinder`
Part of #21979.
## Does this MR meet the acceptance criteria?
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] 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 !6268
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/access_requests.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/access_requests.rb b/lib/api/access_requests.rb index 9d1d9058996..7b9de7c9598 100644 --- a/lib/api/access_requests.rb +++ b/lib/api/access_requests.rb @@ -16,9 +16,9 @@ module API # GET /projects/:id/access_requests get ":id/access_requests" do source = find_source(source_type, params[:id]) - authorize_admin_source!(source_type, source) - access_requesters = paginate(source.requesters.includes(:user)) + access_requesters = AccessRequestsFinder.new(source).execute!(current_user) + access_requesters = paginate(access_requesters.includes(:user)) present access_requesters.map(&:user), with: Entities::AccessRequester, source: source end |