summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-05-14 16:25:10 +0200
committerDouwe Maan <douwe@selenight.nl>2018-05-30 15:58:39 +0200
commitcda2c5e76f18ff773ed0cac548bbf5d62a9adb26 (patch)
tree5d0df9fa2c890d7cbafc6de6e82ac5f2fa44615f /lib/api/projects.rb
parent62d96d8854d35121dc5d3b6ff4fe0949be5795d1 (diff)
downloadgitlab-ce-cda2c5e76f18ff773ed0cac548bbf5d62a9adb26.tar.gz
Only preload member records for the relevant projects/groups/user in projects APIdm-api-projects-members-preload
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 8871792060b..3ef3680c5d9 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -58,16 +58,9 @@ module API
projects = paginate(projects)
projects, options = with_custom_attributes(projects, options)
- if current_user
- project_members = current_user.project_members.preload(:source, user: [notification_settings: :source])
- group_members = current_user.group_members.preload(:source, user: [notification_settings: :source])
- end
-
options = options.reverse_merge(
with: current_user ? Entities::ProjectWithAccess : Entities::BasicProjectDetails,
statistics: params[:statistics],
- project_members: project_members,
- group_members: group_members,
current_user: current_user
)
options[:with] = Entities::BasicProjectDetails if params[:simple]