summaryrefslogtreecommitdiff
path: root/lib/api/members.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-15 18:34:57 +0200
committerRémy Coutable <remy@rymai.me>2016-09-16 17:18:26 +0200
commitd8dd1c1940c929eab324951e3c302d197c5f0dda (patch)
treeb691e1d71dfe7d2d50efffad82a4b9af7dfeb76c /lib/api/members.rb
parent7afee665b091f2afb89f0fdda90fa46d56d3e341 (diff)
downloadgitlab-ce-d8dd1c1940c929eab324951e3c302d197c5f0dda.tar.gz
Ensure invitees are not returned in Members API
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/members.rb')
-rw-r--r--lib/api/members.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/members.rb b/lib/api/members.rb
index 94c16710d9a..37f0a6512f4 100644
--- a/lib/api/members.rb
+++ b/lib/api/members.rb
@@ -18,11 +18,11 @@ module API
get ":id/members" do
source = find_source(source_type, params[:id])
- members = source.members.includes(:user)
- members = members.joins(:user).merge(User.search(params[:query])) if params[:query]
- members = paginate(members)
+ users = source.users
+ users = users.merge(User.search(params[:query])) if params[:query]
+ users = paginate(users)
- present members.map(&:user), with: Entities::Member, members: members
+ present users, with: Entities::Member, source: source
end
# Get a group/project member