gitlab-org--gitlab-foss/app
Yorick Peterse 77d4546eda
Reduce queries in GroupProjectsFinder
GroupProjectsFinder#collection_with_user would run the following code:

    if group.users.include?(current_user)

When running this code for multiple groups this would result in one
query being executed for every group.

This commit simple removes the entire "if" statement with the code of
the "else" statement. This ensures both paths use the same code, and
removes the need for explicitly checking if a user is a member of the
group.
2018-05-28 13:52:37 +02:00
..
assets Merge branch 'leipert-move-ee-specific-pipeline-scss-backport' into 'master' 2018-05-25 22:40:43 +00:00
controllers Fix fast admin counters not working when PostgreSQL has secondaries 2018-05-25 22:58:43 -07:00
finders Reduce queries in GroupProjectsFinder 2018-05-28 13:52:37 +02:00
helpers Fix fast admin counters not working when PostgreSQL has secondaries 2018-05-25 22:58:43 -07:00
mailers Plural reason(s) 2018-05-18 09:50:01 +08:00
models Merge branch '45190-create-notes-diff-files' into 'master' 2018-05-28 09:47:06 +00:00
policies Refactor out duplication in runner_policy.rb 2018-05-16 11:42:09 +02:00
presenters Merge branch 'mr-conflict-notification' into 'master' 2018-05-24 08:49:54 +00:00
serializers Exclude coverage data from the pipelines page 2018-05-17 13:53:00 +02:00
services Merge branch 'rs-projects-destroy-service-parity' into 'master' 2018-05-25 13:34:14 +00:00
uploaders Use the new CacheableAttributes concern in the ApplicationSetting and Appearance models 2018-05-23 16:14:43 +02:00
validators
views Fix fast admin counters not working when PostgreSQL has secondaries 2018-05-25 22:58:43 -07:00
workers Persist truncated note diffs on a new table 2018-05-24 15:34:43 -03:00