summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-03-20 21:14:39 +0100
committerDouwe Maan <douwe@selenight.nl>2016-03-20 21:14:39 +0100
commitfd8d44ca6188b2ad9d6931ce385e61217724a712 (patch)
tree5cde2c3510989a0f64db1eb6500ac19319381f94 /app/finders
parent8db1292139cfdac4c29c03b876b68b9e752cf75a (diff)
downloadgitlab-ce-fd8d44ca6188b2ad9d6931ce385e61217724a712.tar.gz
Fix group project selection in IssuableFinder
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 7510f6e9e29..dd4208880b6 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -80,9 +80,10 @@ class IssuableFinder
@projects = project
elsif current_user && params[:authorized_only].presence && !current_user_related?
@projects = current_user.authorized_projects.reorder(nil)
+ elsif group
+ @projects = GroupProjectsFinder.new(group).execute(current_user).reorder(nil)
else
- @projects = GroupProjectsFinder.new(group).execute(current_user).
- reorder(nil)
+ @projects = ProjectsFinder.new.execute(current_user).reorder(nil)
end
end
@@ -198,8 +199,7 @@ class IssuableFinder
end
def by_group(items)
- items = items.of_group(group) if group
-
+ # Selection by group is already covered by `by_project` and `projects`
items
end