summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-20 16:39:15 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-20 17:02:02 +0300
commit69eba88532a349111e38f5c17038de3f2953dd5b (patch)
treefa8a856ba810daf90bc54f7061b376dd5c97d469 /app/controllers/groups_controller.rb
parent490cce630f5984d063283537ac42a6f9fbad86e6 (diff)
downloadgitlab-ce-69eba88532a349111e38f5c17038de3f2953dd5b.tar.gz
Make sure we render events for projects within a group
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index e23a82d01be..bc3e95f1aed 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -141,6 +141,17 @@ class GroupsController < Groups::ApplicationController
end
def load_events
+ params[:sort] ||= 'latest_activity_desc'
+
+ options = {}
+ options[:only_owned] = true if params[:shared] == '0'
+ options[:only_shared] = true if params[:shared] == '1'
+
+ @projects = GroupProjectsFinder.new(params: params, group: group, options: options, current_user: current_user)
+ .execute
+ .includes(:namespace)
+ .page(params[:page])
+
@events = EventCollection
.new(@projects, offset: params[:offset].to_i, filter: event_filter)
.to_a