diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-28 20:38:32 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-28 09:46:59 +0300 |
commit | 924a6b7d33a245845071894de8d46d77bd44b52e (patch) | |
tree | 1771c05a31b1bf41784c33d1bb1aa2e19ef25268 /lib/api | |
parent | 9a28756c07f0f73bd134385bf11b44527ee81631 (diff) |
New AccessRequestsFinder
Signed-off-by: Rémy Coutable <remy@rymai.me>
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 |